summaryrefslogtreecommitdiff
path: root/core/io/http_client_tcp.h
diff options
context:
space:
mode:
authorCnidarias <roessner.pascal@gmail.com>2021-12-30 01:16:19 +0100
committerCnidarias <roessner.pascal@gmail.com>2021-12-30 01:16:19 +0100
commit69a532414c87bfbc7465c45b92f7315d3edf206b (patch)
tree37d5b231f97a386e247ed045698cc3f11bc637c8 /core/io/http_client_tcp.h
parent9f058674acebf9a7a0704cdbc26dc9f6d853b16e (diff)
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`
Diffstat (limited to 'core/io/http_client_tcp.h')
-rw-r--r--core/io/http_client_tcp.h4
1 files changed, 2 insertions, 2 deletions
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<uint8_t> 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<StreamPeerTCP> tcp_connection;