mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
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
This commit is contained in:
parent
5944de8ecd
commit
615c5740ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254650
|
@ -1400,6 +1400,8 @@ http_connect(struct url *URL, struct url *purl, const char *flags)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue