RE: Section 9.4 POST

>----------
>From: 	jg@w3.org[SMTP:jg@w3.org]
>Subject: 	Re: Section 9.4 POST 
>
>Paul Leach <paulle@microsoft.com> says:
>> Section 9.6 says:
>>
>>If a resource has been created on the origin server, the response SHOULD
>>be 201 (Created) and contain an entity which describes the status of the
>>request and refers to the new resource.
>>
>>Should it says that it SHOULD also return a Content-Location: when a
>>resource has been created? Or at least refer to the Content-Location
>>section to indicate the possible desirability of same?
>
>My intuition says it doesn't buy much; here's why:
>
>Post might create arbitrary resources, not just one.  Trying to
>shoehorn
>that through Content-Location would be a problem; but Post says you
>"SHOULD be 201 (Created) and contain an entity which describes the
>status of the request to the new resource."  This allows Post to
>perform arbitrary operations, while returning arbitrary guidance to
>the end user that might list the 342 resources created....

My reading of previous drafts was that one would normally return
Content-Location (or was it Location then?) if only one resource had
been created and that resource could be fetched with a subsequent GET. 
So, I thought all I was asking for was a tie-in from the POST section to
the Content-Location (or Location) sections in order to make that intent
clear.

After checking the draft, I see that it was Location that I should have
been thinking of, not Content-Location -- and the Location section does
say that one should return a Location header with a 201 (Created)
response. (Your point about POST creating many resources is good, but
most of the time POST will create 0 or one resources that have a URI. I
don't know what to say if it creates many.)

Proposal:

Change
 
>	If a resource has been created on the origin server, the response
>SHOULD
>	be 201 (Created) and contain an entity which describes the status of
>the
>	request and refers to the new resource.

to
>	If a resource has been created on the origin server, the response
>SHOULD
>	be 201 (Created) and contain an entity which describes the status of
>the
	request and refers to the new resource, and a Location header (see
section 14.30).

just to make sure that the requirement for a Location header is clear.

>Paul

>

Received on Friday, 31 May 1996 18:55:05 UTC