Darshit Shah <[email protected]> writes:

> Then I guess we should push this patch.

OK, I've pushed the following patch.

Cheers,
Giuseppe

>From 6b133c63d851cededbe025e81707a44b2ff1fdf0 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <[email protected]>
Date: Mon, 16 Jun 2014 16:34:01 +0200
Subject: [PATCH] Fix a problem with ISA server proxy

---
 NEWS          |  2 ++
 src/ChangeLog |  6 ++++++
 src/http.c    | 10 +++-------
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/NEWS b/NEWS
index 85c0f72..66edee8 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@ Please send GNU Wget bug reports to <[email protected]>.
 ** Introduce --no-config.
 
 ** Introduce --start-pos to allow starting downloads from a specified position.
+
+** Fix a problem with ISA Server Proxy and keep-alive connections.
 
 * Changes in Wget 1.15
 
diff --git a/src/ChangeLog b/src/ChangeLog
index 07d7f38..c933f97 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-16  Giuseppe Scrivano  <[email protected]>
+
+       * http.c (gethttp): Set "Connection: Keep-Alive" with keep-alive
+       connections when using a proxy too.
+       Reported by: Thorsten Schroeteler <[email protected]>.
+
 2014-06-11  Giuseppe Scrivano  <[email protected]>
 
        * ftp.c: Replace main() with main in comments.
diff --git a/src/http.c b/src/http.c
index 9e4dfa4..383e9f3 100644
--- a/src/http.c
+++ b/src/http.c
@@ -1846,13 +1846,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, 
struct url *proxy,
     request_set_header (req, "Connection", "Close", rel_none);
   else
     {
-      if (proxy == NULL)
-        request_set_header (req, "Connection", "Keep-Alive", rel_none);
-      else
-        {
-          request_set_header (req, "Connection", "Close", rel_none);
-          request_set_header (req, "Proxy-Connection", "Keep-Alive", rel_none);
-        }
+      request_set_header (req, "Connection", "Keep-Alive", rel_none);
+      if (proxy)
+        request_set_header (req, "Proxy-Connection", "Keep-Alive", rel_none);
     }
 
   if (opt.method)
-- 
1.9.3

Reply via email to