Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id SAA01728; Tue, 1 Jul 1997 18:10:04 -0700 (PDT) Received: (from gnats@localhost) by hyperreal.org (8.8.5/8.8.5) id SAA01714; Tue, 1 Jul 1997 18:10:01 -0700 (PDT) Date: Tue, 1 Jul 1997 18:10:01 -0700 (PDT) Message-Id: <199707020110.SAA01714@hyperreal.org> From: Kenichi Hori Reply-To: Kenichi Hori To: apache-bugdb@apache.org Cc: apache-bugdb@apache.org Subject: mod_proxy/812: URLs other than http: scheme are not properly analyzed when being forwarded to another proxy In-Reply-To: Your message of Tue, 1 Jul 1997 18:08:30 -0700 (PDT) <199707020108.SAA01578@hyperreal.org> Sender: apache-bugdb-owner@apache.org Precedence: bulk >Number: 812 >Category: mod_proxy >Synopsis: URLs other than http: scheme are not properly analyzed when being forwarded to another proxy >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache (Apache HTTP Project) >State: open >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Jul 1 18:10:01 1997 >Originator: ken@d2.bs1.fc.nec.co.jp >Organization: apache >Release: Apache/1.2.0 >Environment: FreeBSD 2.2.1-RELEASE >Description: In line 172 of proxy_http.c, proxy_http_handler() blindly assumes "http://" URL which is not always the case if ProxyRemote is defined. For example, when "ftp://user:passwd@host:port/path" is being forwarded, desthost, destport and destportstr variables are not properly set. As a result, wrong hostname is checked against NoCache and ProxyBlock directives and wrong "Host:" header is sent. >How-To-Repeat: Set "ProxyRemote * other.proxy.server", and "ProxyBlock some.domain". will pass "GET ftp://some.domain". >Fix: I temporarily replaced url+=7; with a fragment of code to handle both http: and ftp: for my purpose, but shoudn't it be done somewhere outside of proxy_http_handler()%3 >Audit-Trail: >Unformatted: