arrfab / rpms / httpd

Forked from rpms/httpd 5 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1683112.patch

cce4bc
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
cce4bc
index 7f96aff..5517e08 100644
cce4bc
--- a/modules/proxy/mod_proxy.c
cce4bc
+++ b/modules/proxy/mod_proxy.c
cce4bc
@@ -1118,7 +1118,7 @@ static int proxy_handler(request_rec *r)
cce4bc
         AP_PROXY_RUN(r, worker, conf, url, attempts);
cce4bc
         access_status = proxy_run_scheme_handler(r, worker, conf,
cce4bc
                                                  url, NULL, 0);
cce4bc
-        if (access_status == OK)
cce4bc
+        if (access_status == OK || apr_table_get(r->notes, "proxy-error-override"))
cce4bc
             break;
cce4bc
         else if (access_status == HTTP_INTERNAL_SERVER_ERROR) {
cce4bc
             /* Unrecoverable server error.
cce4bc
diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c
cce4bc
index cf52a7d..380b870 100644
cce4bc
--- a/modules/proxy/mod_proxy_ajp.c
cce4bc
+++ b/modules/proxy/mod_proxy_ajp.c
cce4bc
@@ -636,6 +636,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
cce4bc
              */
cce4bc
             rv = r->status;
cce4bc
             r->status = HTTP_OK;
cce4bc
+            /*
cce4bc
+             * prevent proxy_handler() from treating this as an
cce4bc
+             * internal error.
cce4bc
+             */
cce4bc
+            apr_table_setn(r->notes, "proxy-error-override", "1");
cce4bc
         }
cce4bc
         else {
cce4bc
             rv = OK;
cce4bc
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
cce4bc
index 89b5d15..bb5cdf9 100644
cce4bc
--- a/modules/proxy/mod_proxy_http.c
cce4bc
+++ b/modules/proxy/mod_proxy_http.c
cce4bc
@@ -1648,6 +1648,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
cce4bc
                 }
cce4bc
                 ap_discard_request_body(backend->r);
cce4bc
             }
cce4bc
+            /*
cce4bc
+             * prevent proxy_handler() from treating this as an
cce4bc
+             * internal error.
cce4bc
+             */
cce4bc
+            apr_table_setn(r->notes, "proxy-error-override", "1");
cce4bc
             return proxy_status;
cce4bc
         }
cce4bc