Skip to content

Add support for chunked response bodies #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change read() to always check available() if response is chunked
  • Loading branch information
sandeepmistry committed Mar 25, 2017
commit 2a9c01c21070dd035ed8b9d4374dee9cfe2bcb38
7 changes: 2 additions & 5 deletions src/HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,9 @@ int HttpClient::available()

int HttpClient::read()
{
if (iState == eReadingBodyChunk)
if (iIsChunked && !available())
{
if (!available())
{
return -1;
}
return -1;
}

int ret = iClient->read();
Expand Down