]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add an intelligent error message should no proxy submodules be
authorGraham Leggett <minfrin@apache.org>
Wed, 24 Apr 2002 17:37:50 +0000 (17:37 +0000)
committerGraham Leggett <minfrin@apache.org>
Wed, 24 Apr 2002 17:37:50 +0000 (17:37 +0000)
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

src/CHANGES
src/modules/proxy/mod_proxy.c

index 559ae994627472e0fb80a2d12739ef2c1b8a1bcb..07a32ab3a3421b8414aef540f6b0544a7f02d8bf 100644 (file)
@@ -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
index e9a19315a8fd102be42df8e9837e9c63d317bc80..7485901a16f5e0084044744f3003a3c63005561e 100644 (file)
@@ -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;
+    }
 }
 
 /* -------------------------------------------------------------- */