On 02/14/2008 01:55 PM, [EMAIL PROTECTED] wrote:
Author: jim
Date: Thu Feb 14 04:55:57 2008
New Revision: 627728

URL: http://svn.apache.org/viewvc?rev=627728&view=rev
Log:
Add in mod_jk's disablereuse analog for mod_proxy.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/docs/manual/mod/mod_proxy.xml
    httpd/httpd/trunk/modules/proxy/mod_proxy.c
    httpd/httpd/trunk/modules/proxy/mod_proxy.h
    httpd/httpd/trunk/modules/proxy/proxy_util.c



Modified: httpd/httpd/trunk/modules/proxy/mod_proxy.h
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy.h?rev=627728&r1=627727&r2=627728&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy.h (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy.h Thu Feb 14 04:55:57 2008
@@ -352,6 +352,8 @@
     char ping_timeout_set;
     int             lbset;      /* load balancer cluster set */
     char            retry_set;
+    char            disablereuse;
+    char            disablereuse_set;
 };

I am missing a minor bump due to these changes.


/*

Modified: httpd/httpd/trunk/modules/proxy/proxy_util.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c?rev=627728&r1=627727&r2=627728&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/proxy_util.c (original)
+++ httpd/httpd/trunk/modules/proxy/proxy_util.c Thu Feb 14 04:55:57 2008
@@ -1698,7 +1698,7 @@
     }
/* determine if the connection need to be closed */
-    if (conn->close || !worker->is_address_reusable) {
+    if (conn->close || !worker->is_address_reusable || worker->disablereuse) {
         apr_pool_t *p = conn->pool;
         apr_pool_clear(p);
         conn = apr_pcalloc(p, sizeof(proxy_conn_rec));
@@ -1902,8 +1902,13 @@
     if (!worker->retry_set) {
         worker->retry = apr_time_from_sec(PROXY_WORKER_DEFAULT_RETRY);
     }
-    /* By default address is reusable */
-    worker->is_address_reusable = 1;
+    /* By default address is reusable unless DisableReuse is set */
+    if (worker->disablereuse) {
+        worker->is_address_reusable = 0;

Is this really a good idea? Why repeat the DNS resolution only because
we want to avoid persistent connections?


Regards

RĂ¼diger


Reply via email to