This one-line patch fixes an RFC 2616 issue (see wget bug #40819 -
https://savannah.gnu.org/bugs/?40819)
.
If Accept-Encoding header is missing, the server may assume *any* type of
encoding (seems stupid to me, but the Squid proxy seems to obey that).

What do you think ?

Tim
From 624e171062e30e0c92cdd6c3e970f595d30b1572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim Rühsen?= <tim.rueh...@gmx.de>
Date: Tue, 11 Nov 2014 16:01:58 +0100
Subject: [PATCH] Add 'Accept-Encoding: identity' to request header
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes bug #40819
Reported-by: Noël Köthe <n...@debian.org>
---
 src/ChangeLog | 7 +++++++
 src/http.c    | 1 +
 2 files changed, 8 insertions(+)

diff --git a/src/ChangeLog b/src/ChangeLog
index a40a5a6..fc5570a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2014-11-11  Tim Ruehsen  <tim.rueh...@gmx.de>
+
+	* http.c (gethttp): Always add Accept-Encoding: identity
+
+	Fixes bug #40819
+	Reported-by: Noël Köthe <n...@debian.org>
+
 2014-11-10  Tim Ruehsen  <tim.rueh...@gmx.de>

 	* openssl.c: Fix compile-time check for TLSv1.1 and TLSv1.2
diff --git a/src/http.c b/src/http.c
index 584f4a8..de96e32 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1801,6 +1801,7 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
                         rel_value);
   SET_USER_AGENT (req);
   request_set_header (req, "Accept", "*/*", rel_none);
+  request_set_header (req, "Accept-Encoding", "identity", rel_none);

   /* Find the username and password for authentication. */
   user = u->user;
--
2.1.3

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to