Return-Path:
Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org
Received: (qmail 28697 invoked by uid 500); 29 Jan 2002 19:00:46 -0000
Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm
Precedence: bulk
Reply-To: dev@httpd.apache.org
list-help:
list-unsubscribe:
list-post:
Delivered-To: mailing list cvs@httpd.apache.org
Received: (qmail 28678 invoked by uid 500); 29 Jan 2002 19:00:46 -0000
Delivered-To: apmail-httpd-2.0-cvs@apache.org
Date: 29 Jan 2002 19:00:45 -0000
Message-ID: <20020129190045.66807.qmail@icarus.apache.org>
From: ianh@apache.org
To: httpd-2.0-cvs@apache.org
Subject: cvs commit: httpd-2.0/modules/proxy mod_proxy.c
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
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
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 ]
*) 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 @@
Syntax: ProxyPass path url
-or: ProxyPass url when placed in a <location> directive (Apache 2.0 only)
-
+>Syntax: ProxyPass path url
+or: ProxyPass url when placed in a <location> directive (Apache 2.0 only)
+or: ProxyPass path ! to exclude a path from being proxied.
+
http://wibble.org/mirror/foo/bar> to be
internally converted into a proxy request to
<http://foo.com/bar>.
-
-
+
+The ! directive is usefull in situations where you don't want to reverse-proxy
+a subdirectory. eg.
+
+ ProxyPass /mirror/foo http://foo.com
+ ProxyPass /mirror/foo/i !
+
+will proxy all requests to /mirror/foo to foo.com EXCEPT requests made to /mirror/foo/i
+
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";