bugGNU Wget - Bugs: bug #39780, Wget omits Host header for CONNECT...


bug #39780: Wget omits Host header for CONNECT (RFC 2616)

Submitted by:  Noël Köthe <nok>
Submitted on:  Tue 13 Aug 2013 02:09:26 PM UTC  
Category: Protocol IssueSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Closed
Release: trunkOperating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: 1.15Regression: None
Work Required: NonePatch Included: Yes

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 02 Nov 2013 10:32:14 AM UTC, comment #1:

the patch is applied upstream now.

Giuseppe Scrivano <gscrivano>
Project Administrator
Tue 13 Aug 2013 02:09:26 PM UTC, original submission:


reported to the Debian bug tracker http://bugs.debian.org/699337 and discussed on the wget mailinglist https://lists.gnu.org/archive/html/bug-wget/2013-01/msg00019.html
But the patch from Pavel wasn't applied at that time.

Maybe it could be added.

Inline and attached:

--- 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);

Noël Köthe <nok>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #28833:  connect-host-header added by nok (722B - application/octet-stream - connect-host-header.patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by gscrivano (Posted a comment)
  • -unavailable- added by nok (Submitted the item)
  • -unavailable- added by nok

    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 Nov 2013 10:32:14 AM UTCgscrivanoStatusNone=>Fixed
      Planned ReleaseNone=>1.15
    Tue 13 Aug 2013 02:09:26 PM UTCnokAttached File-=>Added connect-host-header, #28833
      Carbon-Copy-=>Added -unavailable-

    Back to the top

    Powered by Savane 3.1-cleanup1