From owner-freebsd-bugs@FreeBSD.ORG Sat Jul 20 02:10:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D224AE91 for ; Sat, 20 Jul 2013 02:10:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id A0C15C2E for ; Sat, 20 Jul 2013 02:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6K2A0Kj091089 for ; Sat, 20 Jul 2013 02:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6K2A0G8091088; Sat, 20 Jul 2013 02:10:00 GMT (envelope-from gnats) Resent-Date: Sat, 20 Jul 2013 02:10:00 GMT Resent-Message-Id: <201307200210.r6K2A0G8091088@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "r4721@tormail.org" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EB7BEE60 for ; Sat, 20 Jul 2013 02:07:26 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) by mx1.freebsd.org (Postfix) with ESMTP id DB43CC14 for ; Sat, 20 Jul 2013 02:07:26 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r6K27P5x020569 for ; Sat, 20 Jul 2013 02:07:25 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r6K27Pi9020562; Sat, 20 Jul 2013 02:07:25 GMT (envelope-from nobody) Message-Id: <201307200207.r6K27Pi9020562@oldred.freebsd.org> Date: Sat, 20 Jul 2013 02:07:25 GMT From: "r4721@tormail.org" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: bin/180666: [patch] fix libfetch incorrect location sent over https with http proxy X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jul 2013 02:10:00 -0000 >Number: 180666 >Category: bin >Synopsis: [patch] fix libfetch incorrect location sent over https with http proxy >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 20 02:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: r4721@tormail.org >Release: >Organization: >Environment: >Description: when using the new https over http proxy support, libfetch sends GET https://host/doc to host after connecting with CONNECT via the proxy. attached patch alters libfetch so it sends GET /doc instead. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: lib/libfetch/http.c =================================================================== --- lib/libfetch/http.c (revision 253282) +++ lib/libfetch/http.c (working copy) @@ -1581,7 +1581,10 @@ if (verbose) fetch_info("requesting %s://%s%s", url->scheme, host, url->doc); - if (purl) { + if (strcasecmp(url->scheme, SCHEME_HTTPS) == 0 && purl) { + http_cmd(conn, "%s %s HTTP/1.1", + op, url->doc); + } else if (purl) { http_cmd(conn, "%s %s://%s%s HTTP/1.1", op, url->scheme, host, url->doc); } else { >Release-Note: >Audit-Trail: >Unformatted: