summaryrefslogtreecommitdiff
path: root/lib/libfetch
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2018-11-27 16:23:17 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2018-11-27 16:23:17 +0000
commita768df3e915fff2d9ef53517c6ba7fee23e98355 (patch)
tree6a94e88b1582cb5213179a81a3fc3eda3b578654 /lib/libfetch
parent52c0ec1455a255df8dd07acb359624ff8c9085a2 (diff)
downloadsrc-test-a768df3e915fff2d9ef53517c6ba7fee23e98355.tar.gz
src-test-a768df3e915fff2d9ef53517c6ba7fee23e98355.zip
When deciding whether to send the complete URL or just the document part,
we were looking at the original URL rather than the one we were currently processing. This meant that if we were trying to retrieve an HTTP URL but were redirected to an HTTPS URL, and HTTPS proxying was enabled, we would send an invalid request and most likely get garbage back. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=341072
Diffstat (limited to 'lib/libfetch')
-rw-r--r--lib/libfetch/http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index 96821160b6798..97788ddc32ab0 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -1617,7 +1617,7 @@ http_request_body(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 && strcmp(URL->scheme, SCHEME_HTTPS) != 0) {
+ if (purl && strcmp(url->scheme, SCHEME_HTTPS) != 0) {
http_cmd(conn, "%s %s://%s%s HTTP/1.1",
op, url->scheme, host, url->doc);
} else {