Skip to content

Commit 208dfec

Browse files
authored
ContentLength can go over 2 byte int
Converted int to long to allow for more then 65535 bytes in length
1 parent 7f36561 commit 208dfec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/HttpClient.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ class HttpClient : public Client
272272
@return Length of the body, in bytes, or kNoContentLengthHeader if no
273273
Content-Length header was returned by the server
274274
*/
275-
int contentLength();
275+
long contentLength();
276276

277277
/** Returns if the response body is chunked
278278
@return true if response body is chunked, false otherwise
@@ -372,7 +372,7 @@ class HttpClient : public Client
372372
// Stores the status code for the response, once known
373373
int iStatusCode;
374374
// Stores the value of the Content-Length header, if present
375-
int iContentLength;
375+
long iContentLength;
376376
// How many bytes of the response body have been read by the user
377377
int iBodyLengthConsumed;
378378
// How far through a Content-Length header prefix we are

0 commit comments

Comments
 (0)