Blame SOURCES/wget-1.14-rh1203384.patch

226bdc
From aed7d4163a9e2083d294a9471e1347ab13d6f2ab Mon Sep 17 00:00:00 2001
226bdc
From: Pavel Mateja <pavel@netsafe.cz>
226bdc
Date: Sat, 2 Nov 2013 11:27:58 +0100
226bdc
Subject: [PATCH] http: specify Host when CONNECT is used.
226bdc
226bdc
---
226bdc
 src/http.c    | 7 +++----
226bdc
 2 files changed, 7 insertions(+), 4 deletions(-)
226bdc
226bdc
diff --git a/src/http.c b/src/http.c
226bdc
index dbfcdfb..8917fa5 100644
226bdc
--- a/src/http.c
226bdc
+++ b/src/http.c
226bdc
@@ -2013,10 +2013,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy,
226bdc
                  the regular request below.  */
226bdc
               proxyauth = NULL;
226bdc
             }
226bdc
-          /* Examples in rfc2817 use the Host header in CONNECT
226bdc
-             requests.  I don't see how that gains anything, given
226bdc
-             that the contents of Host would be exactly the same as
226bdc
-             the contents of CONNECT.  */
226bdc
+          request_set_header (connreq, "Host",
226bdc
+                              aprintf ("%s:%d", u->host, u->port),
226bdc
+                              rel_value);
226bdc
 
226bdc
           write_error = request_send (connreq, sock, 0);
226bdc
           request_free (connreq);
226bdc
-- 
226bdc
2.1.0
226bdc