Skip to content

Commit 2a9c01c

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

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/HttpClient.cpp

+2-5
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)