W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2010

Re: POST with empty body

From: Willy Tarreau <w@1wt.eu>
Date: Thu, 2 Sep 2010 23:30:33 +0200
To: Jan Algermissen <algermissen1971@mac.com>
Cc: "'HTTP Working Group'" <ietf-http-wg@w3.org>
Message-ID: <20100902213033.GC16570@1wt.eu>
On Thu, Sep 02, 2010 at 11:14:22PM +0200, Jan Algermissen wrote:
> 
> On Sep 2, 2010, at 10:49 PM, David Morris wrote:
> 
> > 
> > 
> > On Thu, 2 Sep 2010, Darrel Miller wrote:
> > 
> >> In the description of POST here [1], it starts with:
> >> 
> >> "The POST method is used to request that the origin server accept the
> >> representation enclosed in the request as data to be processed by the
> >> target resource."
> 
> Wouldn't an empty POST body make the above equivalent to 'do something'? And wouldn't that equate to method tunneling?
> (along the lines of POST [empty] to /orders/42/ship )

According to p1-11 page 23 :
   5.  If this is a request message and none of the above are true, then
       the message-body length is zero (no message-body is present).

so a POST with no content-length and no body is equivalent to a POST
with Content-Length: 0 and nothing following, as could perfectly happen
when you upload an empty file for instance. The resource is determined
by the URL and the server has to know how to handle the body, including
if it's empty. I don't see the issue here in fact :-/

Willy
Received on Thursday, 2 September 2010 21:31:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:24 GMT