]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge of r1898127 from trunk:
authorStefan Eissing <icing@apache.org>
Thu, 3 Mar 2022 09:31:51 +0000 (09:31 +0000)
committerStefan Eissing <icing@apache.org>
Thu, 3 Mar 2022 09:31:51 +0000 (09:31 +0000)
  *) mod_proxy: Use the maxium of front end and backend timeouts instead of the
     minimum when tunneling requests (websockets, CONNECT requests).
     Backend timeouts can be configured more selectively (per worker if needed)
     as front end timeouts and typically the backend timeouts reflect the
     application requirements better.  PR 65886

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898559 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_http.c
modules/proxy/proxy_util.c

diff --git a/CHANGES b/CHANGES
index 3c909b3bc5952ae69500fce0f1a882dd74555fc2..b198da2457aae54bd6bcd283addea331a5b09d1b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.4.53
 
+  *) mod_proxy: Use the maxium of front end and backend timeouts instead of the
+     minimum when tunneling requests (websockets, CONNECT requests).
+     Backend timeouts can be configured more selectively (per worker if needed)
+     as front end timeouts and typically the backend timeouts reflect the
+     application requirements better.  PR 65886 [Ruediger Pluem]
+
   *) ap_regex: Use Thread Local Storage (TLS) to recycle ap_regexec() buffers
      when an efficient TLS implementation is available. [Yann Ylavic]
 
index 83b4e2cdd67cbb9c05b95a227f66c595b70cda98..1d5547ae6b8db8ed519f9db4bc7eadf389deb290 100644 (file)
@@ -1485,10 +1485,10 @@ int ap_proxy_http_process_response(proxy_http_req_t *req)
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
 
-            /* Set timeout to the lowest configured for client or backend */
+            /* Set timeout to the highest configured for client or backend */
             apr_socket_timeout_get(backend->sock, &backend_timeout);
             apr_socket_timeout_get(ap_get_conn_socket(c), &client_timeout);
-            if (backend_timeout >= 0 && backend_timeout < client_timeout) {
+            if (backend_timeout >= 0 && backend_timeout > client_timeout) {
                 tunnel->timeout = backend_timeout;
             }
             else {
index b8f77119789865a9a133633cf3aefb1280b57dc2..8cb61efe851e583ce5bf425d3c72fc82110a764c 100644 (file)
@@ -4713,10 +4713,10 @@ PROXY_DECLARE(apr_status_t) ap_proxy_tunnel_create(proxy_tunnel_rec **ptunnel,
     tunnel->origin->pfd->desc.s = ap_get_conn_socket(c_o);
     tunnel->origin->pfd->client_data = tunnel->origin;
 
-    /* Defaults to the smallest timeout of both connections */
+    /* Defaults to the biggest timeout of both connections */
     apr_socket_timeout_get(tunnel->client->pfd->desc.s, &timeout);
     apr_socket_timeout_get(tunnel->origin->pfd->desc.s, &tunnel->timeout);
-    if (timeout >= 0 && (tunnel->timeout < 0 || tunnel->timeout > timeout)) {
+    if (timeout >= 0 && (tunnel->timeout < 0 || tunnel->timeout < timeout)) {
         tunnel->timeout = timeout;
     }