On 6/30/23 11:08 AM, ic...@apache.org wrote:
> Author: icing
> Date: Fri Jun 30 09:08:23 2023
> New Revision: 1910704
>
> URL: http://svn.apache.org/viewvc?rev=1910704&view=rev
> Log:
> proxy: in proxy tunnels, use the smaller timeout value of
> client and origin as timeout for polling the tunnel.
>
>
> Modified:
> httpd/httpd/trunk/modules/proxy/proxy_util.c
>
> Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
> URL:
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=1910704&r1=1910703&r2=1910704&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
> +++ httpd/httpd/trunk/modules/proxy/proxy_util.c Fri Jun 30 09:08:23 2023
> @@ -4921,9 +4921,9 @@ PROXY_DECLARE(apr_status_t) ap_proxy_tun
> apr_socket_timeout_get(tunnel->origin->pfd->desc.s, &origin_timeout);
> apr_socket_opt_set(tunnel->origin->pfd->desc.s, APR_SO_NONBLOCK, 1);
>
> - /* Defaults to the biggest timeout of both connections */
> - tunnel->timeout = (origin_timeout >= 0 && origin_timeout >
> client_timeout)?
> - origin_timeout : client_timeout;
> + /* Defaults to the smallest timeout of both connections */
> + tunnel->timeout = (client_timeout >= 0 && client_timeout <
> origin_timeout ?
> + client_timeout : origin_timeout);
Why? It was the other way round on purpose, e.g. if Timeout is set to 5 for a
small front end timeout and ProxyTimeout is set to
e.g. 600 to keep Websockets open for 10 minutes.
Regards
RĂ¼diger