You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/01/16 19:53:32 UTC

DO NOT REPLY [Bug 44251] New: - Module-driven proxy requests ignore ProxyTimeout directive

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: bugs@httpd.apache.org
        ReportedBy: nick@marden.org


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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 44251] - Module-driven proxy requests ignore ProxyTimeout directive

Posted by bu...@apache.org.
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


rpluem@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From rpluem@apache.org  2008-01-16 11:50 -------
This is already fixed in 2.2.6. Please upgrade and if you can wait a few days
you will be even able to update to 2.2.8.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org