[ 
https://issues.apache.org/jira/browse/HTTPCORE-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967357#comment-16967357
 ] 

ASF subversion and git services commented on HTTPCORE-612:
----------------------------------------------------------

Commit 37b35f407570e2b9c261326d5960edaa3c6f42a1 in httpcomponents-core's branch 
refs/heads/4.4.x from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=37b35f4 ]

HTTPCORE-612: DefaultConnectionReuseStrategy incorrectly used int to represent 
Content-Length value instead of long


> NumberFormatException in DefaultConnectionReuseStrategy
> -------------------------------------------------------
>
>                 Key: HTTPCORE-612
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-612
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.4.10
>            Reporter: Kiran G
>            Priority: Major
>
> DefaultConnectionReuseStrategy uses Integer.parseInt to parse Content-Length 
> header. For size > 2 GB, parsing fails with NumberFormatException. 
> Stack trace
> {code: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) {code}
> Line 90 & 136:
> final int contentLen = Integer.parseInt(clh.getValue());
> Should use Long.parseLong instead.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to