bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH] Add Accept-Encoding to request header (fixes #408


From: Darshit Shah
Subject: Re: [Bug-wget] [PATCH] Add Accept-Encoding to request header (fixes #40819)
Date: Tue, 11 Nov 2014 23:17:06 +0530
User-agent: Mutt/1.5.23 (2014-03-12)

On 11/11, Tim Rühsen wrote:
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 ?

Looks good. Please push it.

Also, I haven't checked, but does Wget handle a 406 Not Acceptable response correctly? It ought to be a fatal error.

P.S.: Unsigned email because GnuPG refused to update without killing the current user session

Tim

From 624e171062e30e0c92cdd6c3e970f595d30b1572 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <address@hidden>
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 <address@hidden>
---
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  <address@hidden>
+
+       * http.c (gethttp): Always add Accept-Encoding: identity
+
+       Fixes bug #40819
+       Reported-by: Noël Köthe <address@hidden>
+
2014-11-10  Tim Ruehsen  <address@hidden>

        * 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




--- end quoted text ---

--
Thanking You,
Darshit Shah



reply via email to

[Prev in Thread] Current Thread [Next in Thread]