Re: GET / DELETE request bodies

> On Feb 24, 2020, at 8:19 AM, Cory Benfield <cory@lukasa.co.uk> wrote:
> 
> On Mon, 17 Feb 2020 at 18:44, Roy T. Fielding <fielding@gbiv.com <mailto:fielding@gbiv.com>> wrote:
>> 
>>> On Feb 17, 2020, at 1:53 AM, Cory Benfield <cory@lukasa.co.uk> wrote:
>>> 
>>> The semantic requirement missing is that DELETE bodies have no
>>> spec-defined semantics. This is not that they can't have semantics, or
>>> that they shouldn't have spec-defined semantics, only that no
>>> specification has ever said what a body in a DELETE request means.
>> 
>> FTR, this is a common misinterpretation, but that is not what it says and
>> certainly not what it means.
>> 
>> They have no semantics in the sense that a body cannot change the meaning
>> of a received request. They are absolutely forbidden to have any impact
>> whatsoever on the processing or interpretation of the request aside from
>> the necessity to read and discard the bytes received in order to maintain
>> the message framing. The only reason we didn't forbid sending a body is
>> because that would lead to lazy implementations assuming no body would
>> be sent.
>> 
>> This has always been the case for HTTP and GET/HEAD/PUT/DELETE.
>> They were defined that way so that the URL would identify the resource
>> and intermediaries would not have to delve into the body to reinterpret
>> the semantics defined by method and header fields.
> 
> I'm finding this...confusing. Did you mean to put PUT in that list?
> Because RFC 7231 doesn't say bodies in PUT have no defined semantics,
> and it's distinctly not like the others in your list. Was CONNECT what
> you had in mind instead?

Er, no, I was thinking about the 1:1 relationship in the identifier and made that all confusing ...
PUT sends a representation in the request body, so the body exists but does not change the
semantics of PUT.  PATCH and POST would be the counterexamples where the recipient has to
process the body in order to determine the request semantics.  CONNECT is just weird.

....Roy

Received on Monday, 24 February 2020 18:13:49 UTC