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`
This commit is contained in:
Cnidarias 2021-12-30 01:16:19 +01:00
parent 9f058674ac
commit 69a532414c
1 changed files with 2 additions and 2 deletions

View File

@ -58,8 +58,8 @@ private:
Vector<uint8_t> chunk; Vector<uint8_t> chunk;
int chunk_left = 0; int chunk_left = 0;
bool chunk_trailer_part = false; bool chunk_trailer_part = false;
int body_size = -1; int64_t body_size = -1;
int body_left = 0; int64_t body_left = 0;
bool read_until_eof = false; bool read_until_eof = false;
Ref<StreamPeerTCP> tcp_connection; Ref<StreamPeerTCP> tcp_connection;