From 69a532414c87bfbc7465c45b92f7315d3edf206b Mon Sep 17 00:00:00 2001 From: Cnidarias Date: Thu, 30 Dec 2021 01:16:19 +0100 Subject: Fix http limitation for large "content-length" When a request was issued to a server that returned "content-length" header whose value was greater than that of an "int" we ran into overflow problems. The fix for this was rather simple by increasing the data type to `int64_t` --- core/io/http_client_tcp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/io') diff --git a/core/io/http_client_tcp.h b/core/io/http_client_tcp.h index 40a962925e..fd43ac8bdd 100644 --- a/core/io/http_client_tcp.h +++ b/core/io/http_client_tcp.h @@ -58,8 +58,8 @@ private: Vector chunk; int chunk_left = 0; bool chunk_trailer_part = false; - int body_size = -1; - int body_left = 0; + int64_t body_size = -1; + int64_t body_left = 0; bool read_until_eof = false; Ref tcp_connection; -- cgit v1.2.3