Date: Thu, 22 Aug 2013 07:43:36 +0000 (UTC) From: Dag-Erling Smørgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254650 - head/lib/libfetch Message-ID: <201308220743.r7M7haKx024934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Thu Aug 22 07:43:36 2013 New Revision: 254650 URL: http://svnweb.freebsd.org/changeset/base/254650 Log: Even though it doesn't really make sense in the context of a CONNECT request, RFC 2616 14.23 mandates the presence of the Host: header in all HTTP 1.1 requests. PR: kern/181445 Submitted by: Kimo <kimor79@yahoo.com> MFC after: 3 days Modified: head/lib/libfetch/http.c Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Thu Aug 22 07:39:53 2013 (r254649) +++ head/lib/libfetch/http.c Thu Aug 22 07:43:36 2013 (r254650) @@ -1400,6 +1400,8 @@ http_connect(struct url *URL, struct url if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && purl) { http_cmd(conn, "CONNECT %s:%d HTTP/1.1", URL->host, URL->port); + http_cmd(conn, "Host: %s:%d", + URL->host, URL->port); http_cmd(conn, ""); if (http_get_reply(conn) != HTTP_OK) { fetch_close(conn);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308220743.r7M7haKx024934>