From: Graham Leggett Date: Wed, 24 Apr 2002 17:37:50 +0000 (+0000) Subject: Add an intelligent error message should no proxy submodules be X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e621005081f90d96f9e6fd1a8c3a41cab428e6b;p=thirdparty%2Fapache%2Fhttpd.git Add an intelligent error message should no proxy submodules be valid to handle a request. PR: 8407 Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@94784 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index 559ae994627..07a32ab3a34 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 1.3.25 + *) Add an intelligent error message should no proxy submodules be + valid to handle a request. PR 8407 [Graham Leggett] + *) Allow child processes sufficient time for cleanups but making ap_select in reclaim_child_processes more "resistant" to signal interupts. Bugz# 8176 diff --git a/src/modules/proxy/mod_proxy.c b/src/modules/proxy/mod_proxy.c index e9a19315a8f..7485901a16f 100644 --- a/src/modules/proxy/mod_proxy.c +++ b/src/modules/proxy/mod_proxy.c @@ -391,19 +391,29 @@ static int proxy_handler(request_rec *r) } } -/* otherwise, try it direct */ -/* N.B. what if we're behind a firewall, where we must use a proxy or - * give up?? - */ + /* otherwise, try it direct */ + /* N.B. what if we're behind a firewall, where we must use a proxy or + * give up?? + */ + /* handle the scheme */ - if (r->method_number == M_CONNECT) + if (r->method_number == M_CONNECT) { return ap_proxy_connect_handler(r, cr, url, NULL, 0); - if (strcasecmp(scheme, "http") == 0) + } + if (strcasecmp(scheme, "http") == 0) { return ap_proxy_http_handler(r, cr, url, NULL, 0); - if (strcasecmp(scheme, "ftp") == 0) + } + if (strcasecmp(scheme, "ftp") == 0) { return ap_proxy_ftp_handler(r, cr, url); - else + } + else { + ap_log_rerror(APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, r, + "proxy: No protocol handler was valid for the URL %s. " + "If you are using a DSO version of mod_proxy, make sure " + "the proxy submodules are included in the configuration " + "using LoadModule.", r->uri); return HTTP_FORBIDDEN; + } } /* -------------------------------------------------------------- */