W3C home > Mailing lists > Public > public-html@w3.org > April 2011

Re: PUT and DELETE methods in 200 code

From: Cameron Heavon-Jones <cmhjones@gmail.com>
Date: Mon, 4 Apr 2011 18:49:47 +0100
Cc: mike amundsen <mamund@yahoo.com>, public-html@w3.org
Message-Id: <0801BB5B-D521-4BFB-94EB-5A46D4B504CB@gmail.com>
To: Julian Reschke <julian.reschke@gmx.de>

On 04/04/2011, at 6:16 PM, Julian Reschke wrote:

> On 04.04.2011 19:08, Cameron Heavon-Jones wrote:
>> On 04/04/2011, at 5:54 PM, Julian Reschke wrote:
>>> On 04.04.2011 18:20, mike amundsen wrote:
>>>> <snip>
>>>>> The tricky question is: how does the server know that a PUT was the result
>>>>> of a form submission?
>>>> </snip>
>>>> Why would this be of interest to the server?
>>>> ...
>>> ...in order to decide whether to return a payload to the UA for display?
>>> Again, I don't believe Accept: helps here; it's not a question of media type, but of the client's intent.
>>> BR, Julian
>> The client's intent is framed by the entire request - URI, headers&  body, Accept is part of that intent.
>> If the UA doesn't specify an Accept i would infer that the intent was they it didn't want\couldn't handle any content. If the UA does specify an Accept, i would infer that it is intending to receive content - for that request. That UAs send Accept with every request just means that they want content in every response, IMO - specifications or real world will most certainly vary.
> <http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p3-payload-13.html#rfc.section.6.1.p.9>:
> "If no Accept header field is present, then it is assumed that the client accepts all media types. If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOULD send a 406 (Not Acceptable) response."
> Please let's stick with what spec says :-)
> Best regards, Julian

Doesn't this leave the default behaviour of services to be browser-sniffing again? If no decision can be made based on Accept, there is no other information from which to deduce the content to produce, if any. That a user requires the information is only deducible by the UA.

The alternative is to mandate that content is provided for all responses (even if that content is empty), and for the server to pick the most relevant format by means of Accept.

The view could be taken that content is implied in all responses by the existence of 204 which is explicitly for no-content successful responses.

Apologies, i have to run, will follow up on this tomorrow.


Received on Monday, 4 April 2011 17:50:24 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:35 UTC