HTTPClient allow "Transfer-Encoding: identity"

While I don't see it in RFC 7230, some web services seem to deliver an
explicit t-e header even with the default identity mapping.  If seen,
let it pass.

Found & fixed by M. Guenther
This commit is contained in:
Earle F. Philhower, III 2025-08-04 11:01:23 -07:00
parent cdf25b45b8
commit 166ab6a6ca

View file

@ -1154,6 +1154,9 @@ int HTTPClient::handleHeaderResponse() {
DEBUG_HTTPCLIENT("[HTTP-Client][handleHeaderResponse] Transfer-Encoding: %s\n", transferEncoding.c_str());
if (transferEncoding.equalsIgnoreCase(F("chunked"))) {
_transferEncoding = HTTPC_TE_CHUNKED;
} else if (transferEncoding.equalsIgnoreCase(F("identity"))) {
// Not in the RFC but seen in the wild
_transferEncoding = HTTPC_TE_IDENTITY;
} else {
_returnCode = HTTPC_ERROR_ENCODING;
return _returnCode;