You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2002/04/24 19:37:50 UTC

cvs commit: apache-1.3/src/modules/proxy mod_proxy.c

minfrin     02/04/24 10:37:50

  Modified:    src      CHANGES
               src/modules/proxy mod_proxy.c
  Log:
  Add an intelligent error message should no proxy submodules be
  valid to handle a request.
  PR: 8407
  
  Revision  Changes    Path
  1.1815    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1814
  retrieving revision 1.1815
  diff -u -r1.1814 -r1.1815
  --- CHANGES	22 Apr 2002 18:23:19 -0000	1.1814
  +++ CHANGES	24 Apr 2002 17:37:49 -0000	1.1815
  @@ -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
  
  
  
  1.82      +18 -8     apache-1.3/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- mod_proxy.c	25 Mar 2002 09:21:58 -0000	1.81
  +++ mod_proxy.c	24 Apr 2002 17:37:50 -0000	1.82
  @@ -391,19 +391,29 @@
               }
           }
   
  -/* 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;
  +    }
   }
   
   /* -------------------------------------------------------------- */