Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9d6adef

Browse files
Merge pull request #90 from Park0/master
ContentLength can go over 2 byte int
2 parents 397e6a1 + 0fac9f0 commit 9d6adef

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/HttpClient.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ bool HttpClient::endOfHeadersReached()
543543
return (iState == eReadingBody || iState == eReadingChunkLength || iState == eReadingBodyChunk);
544544
};
545545

546-
int HttpClient::contentLength()
546+
long HttpClient::contentLength()
547547
{
548548
// skip the response headers, if they haven't been read already
549549
if (!endOfHeadersReached())

‎src/HttpClient.h‎

Lines changed: 2 additions & 2 deletions
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
@@ -374,7 +374,7 @@ class HttpClient : public Client
374374
// Stores the status code for the response, once known
375375
int iStatusCode;
376376
// Stores the value of the Content-Length header, if present
377-
int iContentLength;
377+
long iContentLength;
378378
// How many bytes of the response body have been read by the user
379379
int iBodyLengthConsumed;
380380
// How far through a Content-Length header prefix we are

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /