W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2004

Re: PATCH thoughts...

From: Lisa Dusseault <lisa@osafoundation.org>
Date: Fri, 30 Apr 2004 15:01:34 -0700
Message-Id: <F2089A08-9AF1-11D8-8BCF-000A95B2BB72@osafoundation.org>
Cc: HTTP working group <ietf-http-wg@w3.org>
To: Alex Rousskov <rousskov@measurement-factory.com>

I'm not quite sure I follow, comments inline...

On Apr 30, 2004, at 2:55 PM, Alex Rousskov wrote:

> On Fri, 30 Apr 2004, Lisa Dusseault wrote:
>> RFC2616, section 7.2.1 only requires Content-Type for entity bodies,
>> not for other non-entity request bodies:
>>     When an entity-body is included with a message, the data type of 
>> that
>>     body is determined via the header fields Content-Type and Content-
>>     Encoding.
> The above is not really a requirement. Content-Type is not a REQUIRED
> header. Content-Encoding is only needed for encoded content. The
> presence and transfer-length of request body is determined according
> to these rules (see Section 4.4 for details, subject to errata):
>    2.If a Transfer-Encoding header field (section 14.41) is present
>      ... then the transfer-length is
>      defined by use of the "chunked" transfer-coding (section 3.6)
>    3.If a Content-Length header field (section 14.13) is present, its
>      decimal value in OCTETs represents both the entity-length and the
>      transfer-length.
>    The presence of a message-body in a request is signaled by the
>    inclusion of a Content-Length or Transfer-Encoding header field in
>    the request's message-headers. A message-body MUST NOT be included 
> in
>    a request if the specification of the request method (section 5.1.1)
>    does not allow sending an entity-body in requests. A server SHOULD
>    read and forward a message-body on any request; if the request 
> method
>    does not include defined semantics for an entity-body, then the
>    message-body SHOULD be ignored when handling the request.
> There are other related MUSTs.
>> WebDAV seems to have interpreted this requirement more broadly, as
>> if it were worded "When a body is included with a message, ..." For
>> example, PROPFIND requests contain a body that is not an entity
>> body, but instead additional command detail.
> IMO, any body is "entity body" from HTTP point of view. There are just
> different entities being embodied.

So is it your opinion that Content-Type is required on any HTTP request
that has a body?  If not, then I'm misunderstanding.

>> One compromise is to include Content-Type with a reasonably
>> appropriate MIME type, but one that doesn't need to specify the diff
>> format used.
>>        PATCH /file.txt HTTP/1.1
>>        Host: foo
>>        If-Match: "def"
>>        Content-encoding: gzip
>>        IM: gdiff
>>        Content-Type: application/octet-stream
> As far as I can see, the above request will not be handled correctly
> by intermediaries (they will drop its body). You need either
> Content-Length or Transfer-Encoding header.

I didn't intend to omit that.    This example should have one of those.
The other examples should as well.

> HTH,
> Alex.
Received on Friday, 30 April 2004 18:36:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:10:37 UTC