DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=44251>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=44251 Summary: Module-driven proxy requests ignore ProxyTimeout directive Product: Apache httpd-2 Version: 2.2.4 Platform: All OS/Version: other Status: NEW Severity: enhancement Priority: P3 Component: mod_proxy AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] The ap_proxy_connect_backend() function currently considers only the worker->timeout and server->timeout settings when setting the socket timeout. As a result a configuration such as ProxyPass / http://www.marden.org/ timeout=10 can be configured to have a specific timeout value, but this does not work: ProxyTimeout 10 RewriteRule /(.*) http://www.marden.org/$1 [P,L] Currently the only workaround is to use the Timeout (server timeout) value to configure this behavior - which is not ideal in all cases (c.f. bug 43598). Attached is a simple patch that would consider the mod_proxy ProxyTimeout configuration in deference to the worker config but in preference to the server config. --- httpd-2.2.4.orig/modules/proxy/proxy_util.c 2006-12-19 13:56:16.000000000 -0800 +++ httpd-2.2.4/modules/proxy/proxy_util.c 2008-01-13 05:38:42.000000000 -0800 @@ -1990,6 +1990,7 @@ int loglevel; apr_sockaddr_t *backend_addr = conn->addr; apr_socket_t *newsock; + proxy_server_conf *conf; if (conn->sock) { /* @@ -2032,11 +2033,24 @@ #endif /* Set a timeout on the socket */ + conf = (proxy_server_conf *) ap_get_module_config(s->module_config, &proxy_module); if (worker->timeout_set == 1) { - apr_socket_timeout_set(newsock, worker->timeout); + apr_socket_timeout_set(newsock, worker->timeout); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + "proxy: %s: Set timeout to %d from worker config", + proxy_function, worker->timeout ); + } + else if( conf && conf->timeout ) { + apr_socket_timeout_set(newsock, conf->timeout); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + "proxy: %s: Set timeout to %d from mod_proxy config", + proxy_function, conf->timeout ); } else { apr_socket_timeout_set(newsock, s->timeout); + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, + "proxy: %s: Set timeout to %d from server config", + proxy_function, s->timeout ); } /* Set a keepalive option */ if (worker->keepalive) { -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
