Commit 4087ab92 authored by Conny Seifert's avatar Conny Seifert Committed by Timo Teräs

libfetch: fix parsing of proxy response to CONNECT requests

Instead of skipping just one line, properly parse the response headers.

[TT: reworded commit message]
parent 167fd867
Pipeline #68480 passed with stage
in 35 seconds
......@@ -725,11 +725,6 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached)
http_seterr(conn->err);
goto ouch;
}
/* Read and discard the rest of the proxy response */
if (fetch_getln(conn) < 0) {
fetch_syserr();
goto ouch;
}
do {
switch ((h = http_next_header(conn, &p))) {
case hdr_syserror:
......@@ -741,7 +736,7 @@ http_connect(struct url *URL, struct url *purl, const char *flags, int *cached)
default:
/* ignore */ ;
}
} while (h < hdr_end);
} while (h > hdr_end);
}
if (strcasecmp(URL->scheme, SCHEME_HTTPS) == 0 &&
fetch_ssl(conn, URL, verbose) == -1) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment