bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Send Content-Length with POST 0 length body


From: Matthew Atkinson
Subject: Re: [Bug-wget] Send Content-Length with POST 0 length body
Date: Mon, 20 Oct 2014 20:08:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

On 20/10/14 16:26, Giuseppe Scrivano wrote:
> should we do this only for POST requests?  What about doing it in any
> case that "!(opt.body_data || opt.body_file)"?
> 
> Regards,
> Giuseppe

>From http://tools.ietf.org/html/rfc7230#section-3.3.2
> A user agent SHOULD send a Content-Length in a request message when
> no Transfer-Encoding is sent and the request method defines a
> meaning for an enclosed payload body.  For example, a Content-Length
> header field is normally sent in a POST request even when the value
> is 0 (indicating an empty payload body).  A user agent SHOULD
> NOT send a Content-Length header field when the request message
> does not contain a payload body and the method semantics do not
> anticipate such a body.

I would think that we should do this for POST and PUT, but nothing
else

Thanks,
Matt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]