Skip to content
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
1 change: 1 addition & 0 deletions src/HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@ int HttpClient::readHeader()
// Just in case we get multiple Content-Length headers, this
// will ensure we just get the value of the last one
iContentLength = 0;
iBodyLengthConsumed = 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale of this, does it fix a bug?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was to reset state when a HttpClient is reused.

}
}
else if ((iContentLengthPtr == kContentLengthPrefix) && (c == '\r'))
Expand Down