[libsoup] Handle response header Transfer-Encoding: identity



commit a1148a0431079e4ae6b7a91e135a6aca6878014d
Author: Thomas Bluemel <tbluemel control4 com>
Date:   Thu Jun 27 11:33:35 2019 -0600

    Handle response header Transfer-Encoding: identity
    
    Don't set the encoding to SOUP_ENCODING_UNRECOGNIZED if the
    Transfer-Encoding value is "identity". This allows
    soup_message_headers_get_encoding to determine the encoding
    based on the other headers present (if any).
    
    Fixes #148

 libsoup/soup-message-headers.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
index cdd4f1cf..4e41b031 100644
--- a/libsoup/soup-message-headers.c
+++ b/libsoup/soup-message-headers.c
@@ -666,7 +666,7 @@ transfer_encoding_setter (SoupMessageHeaders *hdrs, const char *value)
        if (value) {
                if (g_ascii_strcasecmp (value, "chunked") == 0)
                        hdrs->encoding = SOUP_ENCODING_CHUNKED;
-               else
+               else if (g_ascii_strcasecmp (value, "identity") != 0)
                        hdrs->encoding = SOUP_ENCODING_UNRECOGNIZED;
        } else
                hdrs->encoding = -1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]