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
