Daniel Dyląg created HTTPCORE-512:

             Summary: GET request should not include Content-Length header
                 Key: HTTPCORE-512
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-512
             Project: HttpComponents HttpCore
          Issue Type: Bug
            Reporter: Daniel Dyląg

According to RFC 7230, chapter 3.3.2:
 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.

This most importantly includes GET method. Instead, in RequestContent class, 
this header is always added if there is no entity. 
if (entity == null) {
 request.addHeader(HTTP.CONTENT_LEN, "0");

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to