mirror of
https://github.com/arduino-libraries/ArduinoHttpClient.git
synced 2025-04-19 21:22:15 +03:00
Merge pull request #90 from Park0/master
ContentLength can go over 2 byte int
This commit is contained in:
commit
9d6adef048
@ -543,7 +543,7 @@ bool HttpClient::endOfHeadersReached()
|
||||
return (iState == eReadingBody || iState == eReadingChunkLength || iState == eReadingBodyChunk);
|
||||
};
|
||||
|
||||
int HttpClient::contentLength()
|
||||
long HttpClient::contentLength()
|
||||
{
|
||||
// skip the response headers, if they haven't been read already
|
||||
if (!endOfHeadersReached())
|
||||
|
@ -272,7 +272,7 @@ public:
|
||||
@return Length of the body, in bytes, or kNoContentLengthHeader if no
|
||||
Content-Length header was returned by the server
|
||||
*/
|
||||
int contentLength();
|
||||
long contentLength();
|
||||
|
||||
/** Returns if the response body is chunked
|
||||
@return true if response body is chunked, false otherwise
|
||||
@ -374,7 +374,7 @@ protected:
|
||||
// Stores the status code for the response, once known
|
||||
int iStatusCode;
|
||||
// Stores the value of the Content-Length header, if present
|
||||
int iContentLength;
|
||||
long iContentLength;
|
||||
// How many bytes of the response body have been read by the user
|
||||
int iBodyLengthConsumed;
|
||||
// How far through a Content-Length header prefix we are
|
||||
|
Loading…
x
Reference in New Issue
Block a user