Skip to content

Commit

Permalink
Fix http limitation for large "content-length"
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
Cnidarias committed Dec 30, 2021
1 parent 9f05867 commit 69a5324
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/io/http_client_tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ class HTTPClientTCP : public HTTPClient {
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;
Expand Down

0 comments on commit 69a5324

Please sign in to comment.