From: Graham Leggett Date: Thu, 8 Aug 2002 17:59:18 +0000 (+0000) Subject: Fix proxy so that it is possible to access ftp: URLs via a proxy X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f9f6d18f409583338f65332d88fca984fa0b3c1;p=apache Fix proxy so that it is possible to access ftp: URLs via a proxy chain. PR: Obtained from: Submitted by: Peter Van Biesen Reviewed by: Graham Leggett git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96320 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 8a8bcaef2b..9b407f6dba 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.40 + *) Fix proxy so that it is possible to access ftp: URLs via a proxy + chain. [Peter Van Biesen ] + *) mod-defalte now checks to make sure that 'gzip-only-text/html' is set to 1, so we can exclude things from the general case with browsermatch. [Ian Holsman, Andre Schild ] diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index bce637b2c2..372565ab74 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -1032,10 +1032,10 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf, } is_ssl = 1; } - else if (strncasecmp(url, "http:", 5)) { + else if (!(strncasecmp(url, "http:", 5)==0 || (strncasecmp(url, "ftp:", 4)==0 && proxyname))) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: HTTP: declining URL %s", url); - return DECLINED; /* only interested in HTTP */ + return DECLINED; /* only interested in HTTP, or FTP via proxy */ } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "proxy: HTTP: serving URL %s", url);