[
https://issues.apache.org/jira/browse/HTTPCORE-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16967358#comment-16967358
]
ASF subversion and git services commented on HTTPCORE-612:
----------------------------------------------------------
Commit a9ab16c4fe4681b592ccd7faefabf50e0b1651ba in httpcomponents-core's branch
refs/heads/master from Oleg Kalnichevski
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-core.git;h=a9ab16c ]
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]