]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Change the logic to choose the maximum of both timeouts (front end socket,
authorRuediger Pluem <rpluem@apache.org>
Wed, 16 Feb 2022 12:35:36 +0000 (12:35 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 16 Feb 2022 12:35:36 +0000 (12:35 +0000)
  backend socket) instead of the minimum as 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/trunk@1898127 13f79535-47bb-0310-9956-ffa450edef68

changes-entries/pr65886.txt [new file with mode: 0644]
modules/proxy/proxy_util.c

diff --git a/changes-entries/pr65886.txt b/changes-entries/pr65886.txt
new file mode 100644 (file)
index 0000000..8321ed4
--- /dev/null
@@ -0,0 +1,5 @@
+  *) 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]
index 574ea65ca23af65416cf8956534c80df331c9b59..73567c22810c80e4f1a8f5e3e2bdc3c64201f3e3 100644 (file)
@@ -4801,10 +4801,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;
     }