You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2021/12/13 15:46:51 UTC

svn commit: r1895903 - in /httpd/httpd/branches/2.4.x: CHANGES STATUS modules/proxy/mod_proxy_connect.c modules/proxy/mod_proxy_http.c

Author: minfrin
Date: Mon Dec 13 15:46:50 2021
New Revision: 1895903

URL: http://svn.apache.org/viewvc?rev=1895903&view=rev
Log:
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


Modified:
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_connect.c
    httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1895903&r1=1895902&r2=1895903&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Mon Dec 13 15:46:50 2021
@@ -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]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1895903&r1=1895902&r2=1895903&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Mon Dec 13 15:46:50 2021
@@ -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:

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_connect.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_connect.c?rev=1895903&r1=1895902&r2=1895903&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_connect.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_connect.c Mon Dec 13 15:46:50 2021
@@ -354,8 +354,6 @@ static int proxy_connect_handler(request
         if (proxyport && !tunnel->replied) {
             return rc;
         }
-        /* Custom log may need this, still */
-        r->status = rc;
     }
 
     /*

Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c?rev=1895903&r1=1895902&r2=1895903&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_http.c Mon Dec 13 15:46:50 2021
@@ -1498,20 +1498,6 @@ int ap_proxy_http_process_response(proxy
 
             /* 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;