[httpd] add support for SetHandler + proxy (#1078970)

Jan Kaluža jkaluza at fedoraproject.org
Fri Mar 28 10:35:24 UTC 2014


commit 5b3da1ff0f24d6da3394e65c24656ab77dada3b3
Author: Jan Kaluza <jkaluza at redhat.com>
Date:   Fri Mar 28 11:35:30 2014 +0100

    add support for SetHandler + proxy (#1078970)

 httpd-2.4.9-r1573626.patch |   29 +++++++++++++++++++++++++++++
 httpd.spec                 |    7 ++++++-
 2 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/httpd-2.4.9-r1573626.patch b/httpd-2.4.9-r1573626.patch
new file mode 100644
index 0000000..58d116b
--- /dev/null
+++ b/httpd-2.4.9-r1573626.patch
@@ -0,0 +1,29 @@
+--- a/modules/proxy/mod_proxy.c	2014/03/03 17:28:10	1573625
++++ b/modules/proxy/mod_proxy.c	2014/03/03 17:28:17	1573626
+@@ -927,8 +927,25 @@
+     struct dirconn_entry *list = (struct dirconn_entry *)conf->dirconn->elts;
+ 
+     /* is this for us? */
+-    if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
++    if (!r->filename) {
+         return DECLINED;
++    }
++
++    if (!r->proxyreq) {
++        /* We may have forced the proxy handler via config or .htaccess */
++        if (r->handler &&
++            strncmp(r->handler, "proxy:", 6) == 0 &&
++            strncmp(r->filename, "proxy:", 6) != 0) {
++            r->proxyreq = PROXYREQ_REVERSE;
++            r->filename = apr_pstrcat(r->pool, r->handler, r->filename, NULL);
++            apr_table_setn(r->notes, "rewrite-proxy", "1");
++        }
++        else {
++            return DECLINED;
++        }
++    } else if (strncmp(r->filename, "proxy:", 6) != 0) {
++        return DECLINED;
++    }
+ 
+     /* handle max-forwards / OPTIONS / TRACE */
+     if ((str = apr_table_get(r->headers_in, "Max-Forwards"))) {
diff --git a/httpd.spec b/httpd.spec
index 2a4f348..19c8eeb 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -14,7 +14,7 @@
 Summary: Apache HTTP Server
 Name: httpd
 Version: 2.4.9
-Release: 2%{?dist}
+Release: 3%{?dist}
 URL: http://httpd.apache.org/
 Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
 Source1: index.html
@@ -62,6 +62,7 @@ Patch29: httpd-2.4.3-mod_systemd.patch
 Patch30: httpd-2.4.4-cachehardmax.patch
 Patch31: httpd-2.4.6-sslmultiproxy.patch
 Patch32: httpd-2.4.7-r1537535.patch
+Patch33: httpd-2.4.9-r1573626.patch
 # Bug fixes
 Patch55: httpd-2.4.4-malformed-host.patch
 Patch56: httpd-2.4.4-mod_unique_id.patch
@@ -187,6 +188,7 @@ interface for storing and accessing per-user session data.
 %patch30 -p1 -b .cachehardmax
 %patch31 -p1 -b .sslmultiproxy
 %patch32 -p1 -b .r1537535
+%patch33 -p1 -b .r1573626
 
 %patch55 -p1 -b .malformedhost
 %patch56 -p1 -b .uniqueid
@@ -622,6 +624,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_rpmconfigdir}/macros.d/macros.httpd
 
 %changelog
+* Fri Mar 28 2014 Jan Kaluza <jkaluza at redhat.com> - 2.4.9-3
+- add support for SetHandler + proxy (#1078970)
+
 * Thu Mar 27 2014 Jan Kaluza <jkaluza at redhat.com> - 2.4.9-2
 - move macros from /etc/rpm to macros.d (#1074277)
 - remove unused patches


More information about the scm-commits mailing list