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:
Oleg Kalnichevski 2017-04-03 19:04:51 +00:00
parent e1c5e5922a
commit ee0e084e8c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}