Skip to content

Commit 166ab6a

Browse files
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
1 parent cdf25b4 commit 166ab6a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libraries/HTTPClient/src/HTTPClient.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,9 @@ int HTTPClient::handleHeaderResponse() {
11541154
DEBUG_HTTPCLIENT("[HTTP-Client][handleHeaderResponse] Transfer-Encoding: %s\n", transferEncoding.c_str());
11551155
if (transferEncoding.equalsIgnoreCase(F("chunked"))) {
11561156
_transferEncoding = HTTPC_TE_CHUNKED;
1157+
} else if (transferEncoding.equalsIgnoreCase(F("identity"))) {
1158+
// Not in the RFC but seen in the wild
1159+
_transferEncoding = HTTPC_TE_IDENTITY;
11571160
} else {
11581161
_returnCode = HTTPC_ERROR_ENCODING;
11591162
return _returnCode;

0 commit comments

Comments
 (0)