You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Kiran G (Jira)" <ji...@apache.org> on 2019/11/04 05:10:00 UTC
[jira] [Created] (HTTPCORE-612) NumberFormatException in
DefaultConnectionReuseStrategy
Kiran G created HTTPCORE-612:
--------------------------------
Summary: 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
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