lib/fetch/http.c: HTTP CONNECT needs two \r\ns

This commit is contained in:
Enno Boland 2016-04-27 11:04:14 +02:00
parent 3a5c1f3a71
commit 7c8b1d7aaa

View File

@ -733,7 +733,7 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached)
/* fetch_connect() has already set an error code */
return (NULL);
if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 && purl) {
http_cmd(conn, "CONNECT %s:%d HTTP/1.1\r\n",
http_cmd(conn, "CONNECT %s:%d HTTP/1.1\r\n\r\n",
URL->host, URL->port);
if (http_get_reply(conn) != HTTP_OK) {
fetch_close(conn);