Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Nov 2018 16:23:17 +0000 (UTC)
From:      =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341072 - head/lib/libfetch
Message-ID:  <201811271623.wARGNHb5028850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: des
Date: Tue Nov 27 16:23:17 2018
New Revision: 341072
URL: https://svnweb.freebsd.org/changeset/base/341072

Log:
  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

Modified:
  head/lib/libfetch/http.c

Modified: head/lib/libfetch/http.c
==============================================================================
--- head/lib/libfetch/http.c	Tue Nov 27 16:16:38 2018	(r341071)
+++ head/lib/libfetch/http.c	Tue Nov 27 16:23:17 2018	(r341072)
@@ -1617,7 +1617,7 @@ http_request_body(struct url *URL, const char *op, str
 		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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811271623.wARGNHb5028850>