You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mt...@apache.org on 2006/10/29 17:59:05 UTC
svn commit: r468939 - in /tomcat/connectors/trunk/jk:
native/apache-1.3/mod_jk.c native/apache-2.0/mod_jk.c
native/common/jk_ajp_common.c native/common/jk_global.h
native/common/jk_service.h xdocs/changelog.xml
Author: mturk
Date: Sun Oct 29 08:59:04 2006
New Revision: 468939
URL: http://svn.apache.org/viewvc?view=rev&rev=468939
Log:
When Tomcat sends AJP body message of size 0,
this means that Servlet has asked for explicit
flush.
Modified:
tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
tomcat/connectors/trunk/jk/native/common/jk_global.h
tomcat/connectors/trunk/jk/native/common/jk_service.h
tomcat/connectors/trunk/jk/xdocs/changelog.xml
Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Sun Oct 29 08:59:04 2006
@@ -515,6 +515,10 @@
s->flush_packets = 1;
else
s->flush_packets = 0;
+ if (conf->options & JK_OPT_FLUSHEADER)
+ s->flush_header = 1;
+ else
+ s->flush_header = 0;
if (conf->options & JK_OPT_DISABLEREUSE)
s->disable_reuse = 1;
@@ -1583,6 +1587,9 @@
}
else if (!strcasecmp(w, "FlushPackets")) {
opt = JK_OPT_FLUSHPACKETS;
+ }
+ else if (!strcasecmp(w, "FlushHeader")) {
+ opt = JK_OPT_FLUSHEADER;
}
else if (!strcasecmp(w, "DisableReuse")) {
opt = JK_OPT_DISABLEREUSE;
Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original)
+++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Sun Oct 29 08:59:04 2006
@@ -533,6 +533,10 @@
s->flush_packets = 1;
else
s->flush_packets = 0;
+ if (conf->options & JK_OPT_FLUSHEADER)
+ s->flush_header = 1;
+ else
+ s->flush_header = 0;
if (conf->options & JK_OPT_DISABLEREUSE)
s->disable_reuse = 1;
@@ -1609,6 +1613,9 @@
}
else if (!strcasecmp(w, "FlushPackets")) {
opt = JK_OPT_FLUSHPACKETS;
+ }
+ else if (!strcasecmp(w, "FlushHeader")) {
+ opt = JK_OPT_FLUSHEADER;
}
else if (!strcasecmp(w, "DisableReuse")) {
opt = JK_OPT_DISABLEREUSE;
Modified: tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_ajp_common.c Sun Oct 29 08:59:04 2006
@@ -1407,14 +1407,23 @@
JK_TRACE_EXIT(l);
return JK_INTERNAL_ERROR;
}
- if (!r->write(r, msg->buf + msg->pos, len)) {
- jk_log(l, JK_LOG_INFO,
- "Writing to client aborted or client network problems");
- JK_TRACE_EXIT(l);
- return JK_CLIENT_WR_ERROR;
+ if (len == 0) {
+ /* AJP13_SEND_BODY_CHUNK with length 0 is
+ * explicit flush packet message.
+ */
+ if (r->flush)
+ r->flush(r);
+ }
+ else {
+ if (!r->write(r, msg->buf + msg->pos, len)) {
+ jk_log(l, JK_LOG_INFO,
+ "Writing to client aborted or client network problems");
+ JK_TRACE_EXIT(l);
+ return JK_CLIENT_WR_ERROR;
+ }
+ if (r->flush && r->flush_packets)
+ r->flush(r);
}
- if (r->flush && r->flush_packets)
- r->flush(r);
}
break;
Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Sun Oct 29 08:59:04 2006
@@ -241,7 +241,8 @@
/* Forward local instead remote address */
#define JK_OPT_FWDLOCAL 0x0010
#define JK_OPT_FLUSHPACKETS 0x0020
-#define JK_OPT_DISABLEREUSE 0x0040
+#define JK_OPT_FLUSHEADER 0x0040
+#define JK_OPT_DISABLEREUSE 0x0080
/* Check for EBCDIC systems */
Modified: tomcat/connectors/trunk/jk/native/common/jk_service.h
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_service.h?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/native/common/jk_service.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_service.h Sun Oct 29 08:59:04 2006
@@ -217,6 +217,11 @@
*/
int flush_packets;
+ /*
+ * If set call flush after AJP13_SEND_HEADERS.
+ */
+ int flush_header;
+
/* Uri worker map. Added for virtual host support
*/
jk_uri_worker_map_t *uw_map;
Modified: tomcat/connectors/trunk/jk/xdocs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/changelog.xml?view=diff&rev=468939&r1=468938&r2=468939
==============================================================================
--- tomcat/connectors/trunk/jk/xdocs/changelog.xml (original)
+++ tomcat/connectors/trunk/jk/xdocs/changelog.xml Sun Oct 29 08:59:04 2006
@@ -26,6 +26,12 @@
<br />
<subsection name="Native">
<changelog>
+ <update>
+ Apache: Added +FlushHeader JkOptions. (mturk)
+ </update>
+ <update>
+ Added explicit flush when AJP body packet size is zero. (mturk)
+ </update>
<fix>
<bug>40774</bug>: Fixing wrong recursion termination. This one restricted the
"reference" feature unintentionally to 20 workers. (rjung)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org