diff options
author | Normen Bolling <normen.bolling@teufel.de> | 2019-08-21 17:43:53 +0200 |
---|---|---|
committer | Normen Bolling <normen.bolling@web.de> | 2019-08-22 07:54:38 +0000 |
commit | 4bb95ada1045c8bcf6690b0d70c359323a27e1c5 (patch) | |
tree | 03286660410aebc7866a531cde3125370a0b8f88 | |
parent | a1148a0431079e4ae6b7a91e135a6aca6878014d (diff) | |
download | libsoup-4bb95ada1045c8bcf6690b0d70c359323a27e1c5.tar.gz |
Added a comment describing why it is necessary to handle
the header "Transfer-Encoding: identity" although it is
invalid regarding RFC 7230.
Issue #148
-rw-r--r-- | libsoup/soup-message-headers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c index 4e41b031..5c8c7cb9 100644 --- a/libsoup/soup-message-headers.c +++ b/libsoup/soup-message-headers.c @@ -664,6 +664,12 @@ static void transfer_encoding_setter (SoupMessageHeaders *hdrs, const char *value) { if (value) { + /* "identity" is a wrong value according to RFC errata 408, + * and RFC 7230 does not list it as valid transfer-coding. + * Nevertheless, the obsolete RFC 2616 stated "identity" + * as valid, so we can't handle it as unrecognized here + * for compatibility reasons. + */ if (g_ascii_strcasecmp (value, "chunked") == 0) hdrs->encoding = SOUP_ENCODING_CHUNKED; else if (g_ascii_strcasecmp (value, "identity") != 0) |