You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/11/04 10:58:58 UTC

[httpcomponents-core] 01/01: HTTPCORE-612: DefaultConnectionReuseStrategy incorrectly used int to represent Content-Length value instead of long

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch HTTPCORE-612
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit 37b35f407570e2b9c261326d5960edaa3c6f42a1
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Mon Nov 4 11:58:35 2019 +0100

    HTTPCORE-612: DefaultConnectionReuseStrategy incorrectly used int to represent Content-Length value instead of long
---
 .../main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java b/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
index 790f3d1..474c378 100644
--- a/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
+++ b/httpcore/src/main/java/org/apache/http/impl/DefaultConnectionReuseStrategy.java
@@ -133,7 +133,7 @@ public class DefaultConnectionReuseStrategy implements ConnectionReuseStrategy {
                 if (clhs.length == 1) {
                     final Header clh = clhs[0];
                     try {
-                        final int contentLen = Integer.parseInt(clh.getValue());
+                        final long contentLen = Long.parseLong(clh.getValue());
                         if (contentLen < 0) {
                             return false;
                         }