You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2019/11/05 09:20:00 UTC
[jira] [Resolved] (HTTPCORE-612) NumberFormatException in
DefaultConnectionReuseStrategy
[ https://issues.apache.org/jira/browse/HTTPCORE-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCORE-612.
----------------------------------------
Fix Version/s: 5.0-beta11
4.4.13
Resolution: Fixed
Fixed in master and 4.4.x.
Oleg
> 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
> Fix For: 4.4.13, 5.0-beta11
>
>
> 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org