From: Pavel Mateja Date: Sat, 2 Nov 2013 10:27:58 +0000 (+0100) Subject: http: specify Host when CONNECT is used. X-Git-Tag: v1.15~10 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=aed7d4163a9e2083d294a9471e1347ab13d6f2ab http: specify Host when CONNECT is used. --- diff --git a/src/ChangeLog b/src/ChangeLog index 73ae4ee9..68e0f867 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-01-30 Pavel Mateja (tiny change) + + * http.c (gethttp): Specify "Host" for CONNECT method. + 2013-10-30 Giuseppe Scrivano * http.c (skip_short_body): Remove assert which is always true. diff --git a/src/http.c b/src/http.c index dbfcdfbf..8917fa55 100644 --- a/src/http.c +++ b/src/http.c @@ -2013,10 +2013,9 @@ gethttp (struct url *u, struct http_stat *hs, int *dt, struct url *proxy, 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, 0); request_free (connreq);