From 71775950e80020084a2c50294a2c40945841fe27 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 20 Apr 2019 11:31:45 +0200 Subject: [PATCH] lib/fetch/http.c: fix https->http redirection via proxy. See https://github.com/void-linux/xbps/issues/52 Thanks @jschultz Closes: #79 [via git-merge-pr] --- lib/fetch/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/fetch/http.c b/lib/fetch/http.c index cb27905e..97324222 100644 --- a/lib/fetch/http.c +++ b/lib/fetch/http.c @@ -935,7 +935,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us, if (verbose) fetch_info("requesting %s://%s%s", url->scheme, host, url->doc); - if (purl && strcasecmp(URL->scheme, SCHEME_HTTPS) != 0) { + if (purl && strcasecmp(url->scheme, SCHEME_HTTPS) != 0) { http_cmd(conn, "%s %s://%s%s HTTP/1.1\r\n", op, url->scheme, host, url->doc); } else { @@ -949,7 +949,7 @@ http_request(struct url *URL, const char *op, struct url_stat *us, /* virtual host */ http_cmd(conn, "Host: %s\r\n", host); - if (strcasecmp(URL->scheme, SCHEME_HTTPS) != 0) + if (strcasecmp(url->scheme, SCHEME_HTTPS) != 0) send_proxy_headers(conn, purl); /* server authorization */