[libsoup] SoupContentDecoder: add another hack to the broken server hack



commit 3316324bafcc35616c57910003242c53cbf237aa
Author: Dan Winship <danw gnome org>
Date:   Sun Dec 4 14:56:01 2011 +0100

    SoupContentDecoder: add another hack to the broken server hack
    
    We were fixing up responses that mistakenly claimed "gzip"
    Content-Encoding for gzipped files, but not responses that mistakenly
    claimed "x-gzip" encoding.

 libsoup/soup-content-decoder.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libsoup/soup-content-decoder.c b/libsoup/soup-content-decoder.c
index 2146612..e5a7125 100644
--- a/libsoup/soup-content-decoder.c
+++ b/libsoup/soup-content-decoder.c
@@ -140,7 +140,8 @@ soup_content_decoder_got_headers_cb (SoupMessage *msg, SoupContentDecoder *decod
 		return;
 
 	/* Workaround for an apache bug (bgo 613361) */
-	if (!g_ascii_strcasecmp (header, "gzip")) {
+	if (!g_ascii_strcasecmp (header, "gzip") ||
+	    !g_ascii_strcasecmp (header, "x-gzip")) {
 		const char *content_type = soup_message_headers_get_content_type (msg->response_headers, NULL);
 
 		if (content_type &&



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