FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Change read() to always check available() if response is chunked · forGGe/ArduinoHttpClient@2a9c01c · GitHub

Repository navigation

Commit 2a9c01c

Browse files
committed
Change read() to always check available() if response is chunked
1 parent 522cf5d commit 2a9c01c

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎src/HttpClient.cpp‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -650,12 +650,9 @@ int HttpClient::available()
650650

651651
int HttpClient::read()
652652
{
653-
if (iState == eReadingBodyChunk)
653+
if (iIsChunked && !available())
654654
{
655-
if (!available())
656-
{
657-
return -1;
658-
}
655+
return -1;
659656
}
660657

661658
int ret = iClient->read();

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL