Blame SOURCES/httpd-2.4.6-r1573626.patch
|
|
41a6c3 |
--- a/modules/proxy/mod_proxy.c 2014/03/03 17:28:10 1573625
|
|
|
41a6c3 |
+++ b/modules/proxy/mod_proxy.c 2014/03/03 17:28:17 1573626
|
|
|
41a6c3 |
@@ -927,8 +927,25 @@
|
|
|
41a6c3 |
struct dirconn_entry *list = (struct dirconn_entry *)conf->dirconn->elts;
|
|
|
41a6c3 |
|
|
|
41a6c3 |
/* is this for us? */
|
|
|
41a6c3 |
- if (!r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
|
|
|
41a6c3 |
+ if (!r->filename) {
|
|
|
41a6c3 |
return DECLINED;
|
|
|
41a6c3 |
+ }
|
|
|
41a6c3 |
+
|
|
|
41a6c3 |
+ if (!r->proxyreq) {
|
|
|
41a6c3 |
+ /* We may have forced the proxy handler via config or .htaccess */
|
|
|
41a6c3 |
+ if (r->handler &&
|
|
|
41a6c3 |
+ strncmp(r->handler, "proxy:", 6) == 0 &&
|
|
|
41a6c3 |
+ strncmp(r->filename, "proxy:", 6) != 0) {
|
|
|
41a6c3 |
+ r->proxyreq = PROXYREQ_REVERSE;
|
|
|
41a6c3 |
+ r->filename = apr_pstrcat(r->pool, r->handler, r->filename, NULL);
|
|
|
41a6c3 |
+ apr_table_setn(r->notes, "rewrite-proxy", "1");
|
|
|
41a6c3 |
+ }
|
|
|
41a6c3 |
+ else {
|
|
|
41a6c3 |
+ return DECLINED;
|
|
|
41a6c3 |
+ }
|
|
|
41a6c3 |
+ } else if (strncmp(r->filename, "proxy:", 6) != 0) {
|
|
|
41a6c3 |
+ return DECLINED;
|
|
|
41a6c3 |
+ }
|
|
|
41a6c3 |
|
|
|
41a6c3 |
/* handle max-forwards / OPTIONS / TRACE */
|
|
|
41a6c3 |
if ((str = apr_table_get(r->headers_in, "Max-Forwards"))) {
|