Package: wget
Version: 1.13.4-3

Wget violates RFC-2616
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9
"The Host request-header field (section 14.23) MUST accompany all HTTP/1.1 
requests."

At least Apache requires all HTTP/1.1 requsts to have Host header.

Older version of wget sends HTTP/1.0 for CONNECT method so it's not affected.

Fix is in attached patch.

Sorry, I read "Don't file bugs upstream" after I sent email to wget-
[email protected]
-- 
Pavel Mateja
--- a/src/http.c	2011-09-07 12:58:01.000000000 +0200
+++ a/src/http.c	2013-01-30 13:32:42.000000000 +0100
@@ -1847,10 +1847,9 @@
                  the regular request below.  */
               proxyauth = NULL;
             }
-          /* Examples in rfc2817 use the Host header in CONNECT
-             requests.  I don't see how that gains anything, given
-             that the contents of Host would be exactly the same as
-             the contents of CONNECT.  */
+          request_set_header (connreq, "Host",
+                              aprintf ("%s:%d", u->host, u->port),
+                              rel_value);
 
           write_error = request_send (connreq, sock);
           request_free (connreq);

Reply via email to