fix cache NFE for big content length
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1790039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e1c5e5922a
commit
ee0e084e8c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue