]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_proxy_http: axe ap_proxy_should_override() duplicate checks.
authorYann Ylavic <ylavic@apache.org>
Wed, 13 May 2020 14:54:51 +0000 (14:54 +0000)
committerYann Ylavic <ylavic@apache.org>
Wed, 13 May 2020 14:54:51 +0000 (14:54 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877696 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c
modules/proxy/mod_proxy_http.c

index 9799c784bbec1ae1112e208c313c46c4e5268d1f..aa8bc94d7ebb1640ad97649152302a8fe3e48f04 100644 (file)
@@ -497,8 +497,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                              * error status so that an underlying error (eg HTTP_NOT_FOUND)
                              * doesn't become an HTTP_OK.
                              */
-                            if (!ap_proxy_should_override(conf, r->status)
-                                    && ap_proxy_should_override(conf, original_status)) {
+                            if (ap_proxy_should_override(conf, original_status)) {
                                 r->status = original_status;
                                 r->status_line = original_status_line;
                             }
index 10631420079d668b4a8652d65374885e3b79d200..417515e9b9f01204520be907858a46bb88eb095b 100644 (file)
@@ -1836,7 +1836,7 @@ int ap_proxy_http_process_response(proxy_http_req_t *req)
              * if we are overriding the errors, we can't put the content
              * of the page into the brigade
              */
-            if (!ap_proxy_should_override(dconf, proxy_status)) {
+            {
                 /* read the body, pass it to the output filters */
                 apr_read_type_e mode = APR_NONBLOCK_READ;
                 int finish = FALSE;
@@ -1846,8 +1846,7 @@ int ap_proxy_http_process_response(proxy_http_req_t *req)
                  * error status so that an underlying error (eg HTTP_NOT_FOUND)
                  * doesn't become an HTTP_OK.
                  */
-                if (!ap_proxy_should_override(dconf, proxy_status)
-                        && ap_proxy_should_override(dconf, original_status)) {
+                if (ap_proxy_should_override(dconf, original_status)) {
                     r->status = original_status;
                     r->status_line = original_status_line;
                 }