httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy mod_proxy.c
Date Tue, 29 Jan 2002 19:00:45 GMT
ianh        02/01/29 11:00:45

  Modified:    .        CHANGES
               docs/manual/mod mod_proxy.html
               modules/proxy mod_proxy.c
  Log:
  configuration change.
  allow a '!' directive to stop proxying these requests
  eg.
  
    ProxyPass /services/images/     !
    ProxyPass /services/            http://service-machine/services/
  
  which will stop requests to /services/images/ from being proxied
  
  Submitted by:	Jukka Pihl <jukka.pihl@entirem.com>
  Reviewed by:	Ian Holsman, Graham Legget, Chuck Murcko
  
  Revision  Changes    Path
  1.545     +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.544
  retrieving revision 1.545
  diff -u -r1.544 -r1.545
  --- CHANGES	29 Jan 2002 04:54:04 -0000	1.544
  +++ CHANGES	29 Jan 2002 19:00:44 -0000	1.545
  @@ -1,4 +1,6 @@
   Changes with Apache 2.0.31-dev
  +  *) New Directive Option for ProxyPass. It now can block a location
  +     from being proxied [Jukka Pihl <jukka.pihl@entirem.com>]
   
     *) Don't let the default handler try to serve a raw directory.  At
        best you get gibberish.  Much worse things can happen depending
  
  
  
  1.67      +13 -5     httpd-2.0/docs/manual/mod/mod_proxy.html
  
  Index: mod_proxy.html
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_proxy.html,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- mod_proxy.html	29 Sep 2001 20:21:14 -0000	1.66
  +++ mod_proxy.html	29 Jan 2002 19:00:45 -0000	1.67
  @@ -328,9 +328,10 @@
   <A
    HREF="directive-dict.html#Syntax"
    REL="Help"
  -><STRONG>Syntax:</STRONG></A> ProxyPass <EM>path url</EM><br>

  -or: ProxyPass <EM>url</EM> when placed in a &lt;location&gt; directive
<em>(Apache 2.0 only)</em>
  -<br>
  +><STRONG>Syntax:</STRONG></A> ProxyPass <EM>path url</EM><BR>

  +or: ProxyPass <EM>url</EM> when placed in a &lt;location&gt; directive
<em>(Apache 2.0 only)</EM><br>
  +or: ProxyPass <EM>path !</EM> to exclude a path from being proxied.
  +<BR>
   <A
    HREF="directive-dict.html#Default"
    REL="Help"
  @@ -370,8 +371,15 @@
   &lt;<SAMP>http://wibble.org/mirror/foo/bar</SAMP>&gt; to be
   internally converted into a proxy request to
   &lt;<SAMP>http://foo.com/bar</SAMP>&gt;.
  -
  -
  +<P>
  +The ! directive is usefull in situations where you don't want to reverse-proxy
  +a subdirectory. eg.
  +<PRE>
  +        ProxyPass /mirror/foo http://foo.com
  +        ProxyPass /mirror/foo/i !
  +</PRE>
  +will proxy all requests to /mirror/foo to foo.com EXCEPT requests made to /mirror/foo/i
  +</P>
   <HR>
   
   <H2><A NAME="proxypassreverse">ProxyPassReverse</A> directive</H2>
  
  
  
  1.66      +4 -0      httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- mod_proxy.c	17 Jan 2002 02:22:22 -0000	1.65
  +++ mod_proxy.c	29 Jan 2002 19:00:45 -0000	1.66
  @@ -188,6 +188,10 @@
           len = alias_match(r->uri, ent[i].fake);
   	    
          if (len > 0) {
  +           if ((ent[i].real[0] == '!' ) & ( ent[i].real[1] == 0 )) {
  +               return DECLINED;
  +           }
  +
              r->filename = apr_pstrcat(r->pool, "proxy:", ent[i].real,
                                    (r->uri + len ), NULL);
              r->handler = "proxy-server";
  
  
  

Mime
View raw message