From: Yann Ylavic Date: Wed, 13 May 2020 14:54:51 +0000 (+0000) Subject: mod_proxy_http: axe ap_proxy_should_override() duplicate checks. X-Git-Tag: 2.5.0-alpha2-ci-test-only~1441 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8fbe83f5a2b8957c57e9405f9242f7a9a908de22;p=thirdparty%2Fapache%2Fhttpd.git mod_proxy_http: axe ap_proxy_should_override() duplicate checks. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877696 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index 9799c784bbe..aa8bc94d7eb 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -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; } diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index 10631420079..417515e9b9f 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -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; }