Index: docs/manual/mod/mod_proxy.xml
===================================================================
--- docs/manual/mod/mod_proxy.xml (revision 655535)
+++ docs/manual/mod/mod_proxy.xml (working copy)
@@ -663,6 +663,17 @@
in the pool the Apache will return SERVER_BUSY status to
the client.
+
| flushpackets |
off |
Determines whether the proxy module will auto-flush the output
Index: CHANGES
===================================================================
--- CHANGES (revision 655535)
+++ CHANGES (working copy)
@@ -33,6 +33,10 @@
or remote port can be logged. PR 43415. [Adam Hasselbalch Hansen
, Ruediger Pluem, Jeff Trawick]
+ *) Added 'disablereuse' option for ProxyPass which, essentially,
+ disables connection pooling for the backend servers.
+ [Jim Jagielski]
+
*) mod_speling: remove regression from 1.3/2.0 behavior and
drop dependency between mod_speling and AcceptPathInfo.
PR 43562 [Jose Kahan ]
Index: modules/proxy/proxy_util.c
===================================================================
--- modules/proxy/proxy_util.c (revision 655535)
+++ modules/proxy/proxy_util.c (working copy)
@@ -1617,7 +1617,8 @@
#endif
/* determine if the connection need to be closed */
- if (conn->close_on_recycle || conn->close) {
+ if (conn->close_on_recycle || conn->close || worker->disablereuse ||
+ !worker->is_address_reusable) {
apr_pool_t *p = conn->pool;
apr_pool_clear(conn->pool);
memset(conn, 0, sizeof(proxy_conn_rec));
@@ -1771,8 +1772,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;
+ }
+ else {
+ worker->is_address_reusable = 1;
+ }
#if APR_HAS_THREADS
ap_mpm_query(AP_MPMQ_MAX_THREADS, &mpm_threads);
@@ -1984,7 +1990,8 @@
*
* TODO: Handle this much better...
*/
- if (!conn->hostname || !worker->is_address_reusable ||
+ if (!conn->hostname || !worker->is_address_reusable ||
+ worker->disablereuse ||
(r->connection->keepalives &&
(r->proxyreq == PROXYREQ_PROXY || r->proxyreq == PROXYREQ_REVERSE) &&
(strcasecmp(conn->hostname, uri->hostname) != 0) ) ) {
Index: modules/proxy/mod_proxy.c
===================================================================
--- modules/proxy/mod_proxy.c (revision 655535)
+++ modules/proxy/mod_proxy.c (working copy)
@@ -168,6 +168,15 @@
return "KeepAlive must be On|Off";
worker->keepalive_set = 1;
}
+ else if (!strcasecmp(key, "disablereuse")) {
+ if (!strcasecmp(val, "on"))
+ worker->disablereuse = 1;
+ else if (!strcasecmp(val, "off"))
+ worker->disablereuse = 0;
+ else
+ return "DisableReuse must be On|Off";
+ worker->disablereuse_set = 1;
+ }
else if (!strcasecmp(key, "route")) {
/* Worker route.
*/
Index: modules/proxy/mod_proxy.h
===================================================================
--- modules/proxy/mod_proxy.h (revision 655535)
+++ modules/proxy/mod_proxy.h (working copy)
@@ -337,6 +337,8 @@
apr_interval_time_t ping_timeout;
char ping_timeout_set;
char retry_set;
+ char disablereuse;
+ char disablereuse_set;
};
/*
Index: include/ap_mmn.h
===================================================================
--- include/ap_mmn.h (revision 655535)
+++ include/ap_mmn.h (working copy)
@@ -120,7 +120,9 @@
* 20051115.9 (2.2.7) Add ap_send_interim_response API
* 20051115.10(2.2.7) Added ap_mod_status_reqtail (minor)
* 20051115.11(2.2.7) Add *ftp_directory_charset to proxy_dir_conf
- * 20051115.12(2.2.8) Add optional function ap_logio_add_bytes_in() to mog_logio
+ * 20051115.12(2.2.8) Add optional function ap_logio_add_bytes_in() to mog_logio
+ * 20051115.13(2.2.9) Add disablereuse and disablereuse_set
+ * to proxy_worker struct (minor)
*
*/
@@ -129,7 +131,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 12 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 13 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
|