tis 2008-02-05 klockan 13:52 +0100 skrev Julian Reschke:
> Again? Why would you want to return a Location header in PUT->201? I
> don't think servers do return it today.
Can think of a number of reasons. Location in 201 is pretty much the
same as Content-Location in 200. In simple cases it's identical to the
Request-URI but there is a number of cases where they may differ.
A example for PUT would be a server implementing "nameless PUT" to a
directory automatically assigning a name to the created resource.
Another would be when the PUT request was carried out on a valid URI for
the resource but it's not the preffered URI for fetching the created
resource, or yet another would be a versioned resource where each PUT
creates a new resource each at unique locations.
But this use of Location in 201 is a lot more apparent when looking at
the use of POST for creating resources. But PUT isn't really that
different.
Regards
Henrik