From: Graham Leggett Date: Mon, 13 Dec 2021 15:46:50 +0000 (+0000) Subject: Backport. X-Git-Tag: candidate-2.4.52-rc1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a4d3c46761e4d836620ce26d1c652716a79bc7a;p=thirdparty%2Fapache%2Fhttpd.git Backport. *) mod_proxy_connect, mod_proxy: Do not change the status code after we already sent it to the client. Trunk version of patch: https://svn.apache.org/r1895715 Backport version for 2.4.x of patch: https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/283.diff Can be applied via apply_backport_pr.sh 283 +1: rpluem, icing, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895903 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index d3af8ac6127..f001548c1e6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.4.52 + *) mod_proxy_connect, mod_proxy: Do not change the status code after we + already sent it to the client. + *) mod_http: Correctly sent a 100 Continue status code when sending an interim response as result of an Expect: 100-Continue in the request and not the current status code of the request. PR 65725 [Ruediger Pluem] diff --git a/STATUS b/STATUS index 2585b360924..3dc0e4fb987 100644 --- a/STATUS +++ b/STATUS @@ -145,14 +145,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) mod_proxy_connect, mod_proxy: Do not change the status code after we - already sent it to the client. - Trunk version of patch: - https://svn.apache.org/r1895715 - Backport version for 2.4.x of patch: - https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/283.diff - Can be applied via apply_backport_pr.sh 283 - +1: rpluem, icing, minfrin PATCHES PROPOSED TO BACKPORT FROM TRUNK: diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c index eb6dd7e166d..2d05d116735 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 3e5c0567175..9109afede23 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1498,20 +1498,6 @@ int ap_proxy_http_process_response(proxy_http_req_t *req) /* Let proxy tunnel forward everything */ status = ap_proxy_tunnel_run(tunnel); - if (ap_is_HTTP_ERROR(status)) { - /* Tunnel always return HTTP_GATEWAY_TIME_OUT on timeout, - * but we can differentiate between client and backend here. - */ - if (status == HTTP_GATEWAY_TIME_OUT - && tunnel->timeout == client_timeout) { - status = HTTP_REQUEST_TIME_OUT; - } - } - else { - /* Update r->status for custom log */ - status = HTTP_SWITCHING_PROTOCOLS; - } - r->status = status; /* We are done with both connections */ return DONE;