From: Ruediger Pluem Date: Thu, 9 Dec 2021 07:40:25 +0000 (+0000) Subject: * Do not change the status code after we already sent it to the client. X-Git-Tag: 2.5.0-alpha2-ci-test-only~659 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=43d7517dd7f3a72a8700c94cae45025ca1cf2f3d;p=thirdparty%2Fapache%2Fhttpd.git * Do not change the status code after we already sent it to the client. Changing the status code after we sent it to the client causes a status code being logged that is different from the one sent to the client which can be confusing. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895715 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c index 7e503e3322a..12b72a54c92 100644 --- a/modules/proxy/mod_proxy_connect.c +++ b/modules/proxy/mod_proxy_connect.c @@ -354,8 +354,6 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker, if (proxyport && !tunnel->replied) { return rc; } - /* Custom log may need this, still */ - r->status = rc; } /* diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index c729220f3b7..91be06fc121 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1539,9 +1539,6 @@ int ap_proxy_http_process_response(proxy_http_req_t *req) /* Let proxy tunnel forward everything within this thread */ req->tunnel->timeout = req->idle_timeout; status = ap_proxy_tunnel_run(req->tunnel); - if (ap_is_HTTP_ERROR(status)) { - r->status = status; - } /* Report bytes exchanged by the backend */ backend->worker->s->read +=