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

   **[Kiran 
G](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kiransg)** 
opened 
**[HTTPCORE-612](https://issues.apache.org/jira/browse/HTTPCORE-612?redirect=false)**
 and commented
   
   DefaultConnectionReuseStrategy uses Integer.parseInt to parse Content-Length 
header. For size > 2 GB, parsing fails with NumberFormatException.
   
   Stack trace
   
   ```java
   parseInt:658, Integer (java.lang)
   parseInt:776, Integer (java.lang)
   keepAlive:136, DefaultConnectionReuseStrategy (org.apache.http.impl)
   keepAlive:62, DefaultClientConnectionReuseStrategy 
(org.apache.http.impl.client)
   execute:275, MainClientExec (org.apache.http.impl.execchain)
   execute:186, ProtocolExec (org.apache.http.impl.execchain)
   execute:89, RetryExec (org.apache.http.impl.execchain)
   doExecute:185, InternalHttpClient (org.apache.http.impl.client)
   execute:83, CloseableHttpClient (org.apache.http.impl.client) 
   ```
   
   Line 90 & 136:
   
   final int contentLen = Integer.parseInt(clh.getValue());
   
   Should use Long.parseLong instead.
   
   
   ---
   
   **Affects:** 4.4.10
   
   **Backported to:** 
[4.4.13](https://github.com/apache/httpcomponents-core/milestone/50?closed=1)
   


-- 
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