Re: server applying PUT to a resource other than the request-URI

Roy T. Fielding wrote:
>> But in this case a temporary redirect is actually needed. If the 
>> client gets a 301, it potentially use the URI given in Location: for 
>> all subsequent request, and that's definitively not what people want 
>> in this case.
> 
> In that case, use of PUT is not an option.  PUT implies that the client
> wants to use that URI.  301 is saying that they can't use that URI, but
> they should try using this other URI for the *same resource*.
> 
> It seems to me that their use case requires POST.  Why is that a problem?

The only problem is that in WebDAV land there's some reluctance to use 
POST for *anything*, because of it's open ended semantics.

That's why I made a proposal through which a server can advertise a URI 
that accepts POST requests for the purpose of creating collection 
membbers (WebDAV property/link relation/element in response body).

>>> ...
>> Right now some work around their problem by accepting the PUT (with 
>> 201), but storing the resource under a different URI, and it seems to 
>> me that this a bad idea (given the PUT semantics defined in HTTP).
> 
> It isn't allowed by HTTP for that reason.
> ...

Indeed.

BR, Julian

Received on Friday, 24 October 2008 23:39:56 UTC