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/05 09:18:25 UTC
[httpcomponents-core] branch master updated: 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 master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/master by this push:
new a9ab16c HTTPCORE-612: DefaultConnectionReuseStrategy incorrectly used int to represent Content-Length value instead of long
a9ab16c is described below
commit a9ab16c4fe4681b592ccd7faefabf50e0b1651ba
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
---
.../org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java
index c5548bb..0231bcb 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/DefaultConnectionReuseStrategy.java
@@ -97,7 +97,7 @@ public class DefaultConnectionReuseStrategy implements ConnectionReuseStrategy {
final Header clh = response.getFirstHeader(HttpHeaders.CONTENT_LENGTH);
if (clh != null) {
try {
- final int contentLen = Integer.parseInt(clh.getValue());
+ final long contentLen = Long.parseLong(clh.getValue());
if (contentLen > 0) {
return false;
}