Skip to content

Commit 32895db

Browse files
committed
Treat 101 status codes as a complete
1 parent 9328370 commit 32895db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

HttpClient.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,15 +439,15 @@ int HttpClient::responseStatusCode()
439439
delay(kHttpWaitForDataDelay);
440440
}
441441
}
442-
if ( (c == '\n') && (iStatusCode < 200) )
442+
if ( (c == '\n') && (iStatusCode < 200 && iStatusCode != 101) )
443443
{
444444
// We've reached the end of an informational status line
445445
c = '\0'; // Clear c so we'll go back into the data reading loop
446446
}
447447
}
448448
// If we've read a status code successfully but it's informational (1xx)
449449
// loop back to the start
450-
while ( (iState == eStatusCodeRead) && (iStatusCode < 200) );
450+
while ( (iState == eStatusCodeRead) && (iStatusCode < 200 && iStatusCode != 101) );
451451

452452
if ( (c == '\n') && (iState == eStatusCodeRead) )
453453
{

0 commit comments

Comments
 (0)