jira-importer opened a new issue, #1298:
URL: https://github.com/apache/httpcomponents-core/issues/1298

   **[Daniel 
Dyląg](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ddylag)** 
opened 
**[HTTPCORE-512](https://issues.apache.org/jira/browse/HTTPCORE-512?redirect=false)**
 and commented
   
   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. 
   
   ```java
   if (entity == null) {
    request.addHeader(HTTP.CONTENT_LEN, "0");
    return;
   }
   ```
   
    
   
   Some servers take advantage of this rule and make incorrect assumptions when 
dealing with requests from this library.
   
   
   ---
   No further details from 
[HTTPCORE-512](https://issues.apache.org/jira/browse/HTTPCORE-512?redirect=false)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to