hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1790039 - /httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java
Date Mon, 03 Apr 2017 19:04:51 GMT
Author: olegk
Date: Mon Apr  3 19:04:51 2017
New Revision: 1790039

URL: http://svn.apache.org/viewvc?rev=1790039&view=rev
Log:
fix cache   NFE for big content length

Modified:
    httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java

Modified: httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java?rev=1790039&r1=1790038&r2=1790039&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseCachingPolicy.java
Mon Apr  3 19:04:51 2017
@@ -129,7 +129,7 @@ class ResponseCachingPolicy {
 
         final Header contentLength = response.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
         if (contentLength != null) {
-            final int contentLengthValue = Integer.parseInt(contentLength.getValue());
+            final long contentLengthValue = Long.parseLong(contentLength.getValue());
             if (contentLengthValue > this.maxObjectSizeBytes) {
                 return false;
             }



Mime
View raw message