On Aug 21, 2006, at 8:51 AM, Jim Jagielski wrote:
I agree that the solution is not pretty, so in many ways
I look at the "feature" as similar to the flush_packets
feature: a help to those admin's who are stuck.
I'm looking at something like this:
Index: jk/native/apache-1.3/mod_jk.c
===================================================================
--- jk/native/apache-1.3/mod_jk.c (revision 433241)
+++ jk/native/apache-1.3/mod_jk.c (working copy)
@@ -476,6 +476,12 @@
s->flush_packets = 1;
else
s->flush_packets = 0;
+
+ if (conf->options & JK_OPT_DISABLEREUSE)
+ s->disable_reuse = 1;
+ else
+ s->disable_reuse = 0;
+
/* get server name */
/* s->server_name = (char *)(r->hostname ? r->hostname : r-
>server->server_hostname); */
/* XXX : ‡ la jk2 */
@@ -1515,6 +1521,9 @@
else if (!strcasecmp(w, "FlushPackets")) {
opt = JK_OPT_FLUSHPACKETS;
}
+ else if (!strcasecmp(w, "DisableReuse")) {
+ opt = JK_OPT_DISABLEREUSE;
+ }
else
return ap_pstrcat(cmd->pool, "JkOptions: Illegal option
'", w,
"'", NULL);
Index: jk/native/common/jk_ajp_common.c
===================================================================
--- jk/native/common/jk_ajp_common.c (revision 433241)
+++ jk/native/common/jk_ajp_common.c (working copy)
@@ -1456,12 +1456,17 @@
*/
jk_log(l, JK_LOG_INFO, " Protocol error: Reuse is set
to false");
}
+ else if (r->disable_reuse) {
+ ae->reuse = JK_FALSE;
+ }
+ else {
+ /* Reuse in all cases */
+ ae->reuse = JK_TRUE;
+ }
/* Flush after the last write */
if (r->flush && !r->flush_packets)
r->flush(r);
- /* Reuse in all cases */
- ae->reuse = JK_TRUE;
JK_TRACE_EXIT(l);
return JK_AJP13_END_RESPONSE;
break;
Index: jk/native/common/jk_service.h
===================================================================
--- jk/native/common/jk_service.h (revision 433241)
+++ jk/native/common/jk_service.h (working copy)
@@ -254,6 +254,12 @@
* Flush a chunk of response data back to the browser.
*/
void (JK_METHOD * flush) (jk_ws_service_t *s);
+
+ /*
+ * If set do not reuse socket after each full response
+ */
+ int disable_reuse;
+
};
/*
Index: jk/native/common/jk_global.h
===================================================================
--- jk/native/common/jk_global.h (revision 433241)
+++ jk/native/common/jk_global.h (working copy)
@@ -241,6 +241,7 @@
/* Forward local instead remote address */
#define JK_OPT_FWDLOCAL 0x0010
#define JK_OPT_FLUSHPACKETS 0x0020
+#define JK_OPT_DISABLEREUSE 0x0040
/* Check for EBCDIC systems */
Index: jk/native/apache-2.0/mod_jk.c
===================================================================
--- jk/native/apache-2.0/mod_jk.c (revision 433241)
+++ jk/native/apache-2.0/mod_jk.c (working copy)
@@ -501,6 +501,12 @@
s->flush_packets = 1;
else
s->flush_packets = 0;
+
+ if (conf->options & JK_OPT_DISABLEREUSE)
+ s->disable_reuse = 1;
+ else
+ s->disable_reuse = 0;
+
/* get server name */
s->server_name = (char *)ap_get_server_name(r);
@@ -1547,6 +1553,9 @@
else if (!strcasecmp(w, "FlushPackets")) {
opt = JK_OPT_FLUSHPACKETS;
}
+ else if (!strcasecmp(w, "DisableReuse")) {
+ opt = JK_OPT_DISABLEREUSE;
+ }
else
return apr_pstrcat(cmd->pool, "JkOptions: Illegal
option '", w,
"'", NULL);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]