mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Fix handling of chunked transfer encoding (#1975)
This commit is contained in:
parent
edaae2c194
commit
76e322f2e7
@ -624,6 +624,13 @@ int HTTPClient::writeToStream(Stream * stream)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// read trailing \r\n at the end of the chunk
|
||||||
|
char buf[2];
|
||||||
|
auto trailing_seq_len = _tcp->readBytes((uint8_t*)buf, 2);
|
||||||
|
if (trailing_seq_len != 2 || buf[0] != '\r' || buf[1] != '\n') {
|
||||||
|
return returnError(HTTPC_ERROR_READ_TIMEOUT);
|
||||||
|
}
|
||||||
|
|
||||||
delay(0);
|
delay(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user