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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to