tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GOMEZ Henri <hgo...@slib.fr>
Subject Ajp13 change in recent TC 3.3
Date Mon, 17 Sep 2001 09:22:09 GMT
Hi to all,

The works conducted on ajp13 in TC 3.3 to add chunk 
support and better handling of the content-length,
have broken compatibility with previous mod_jk.

Now, from the java side, the content-length is mandatory
in stream, and if you try to use olders mod_jk 
(ie from TC 3.2.3 or the one from JTC before I commit changes) 
with recent TC 3.3, tomcat will wait infinitly the rest of data.

if content-length is not sent by mod_jk, contentLength = -1
and we'll try to get data in line 417 and will wait forever.

>From Ajp13 - Line 409 :

	// Check to see if there should be a body packet coming along
	// immediately after
	MessageBytes clB=headers.getValue("content-length");
        int contentLength = (clB==null) ? -1 : clB.getInt();
	if( dL > 0 ) d("Content-Length: " + contentLength );
    	if(contentLength != 0) {
	    req.setContentLength( contentLength );
	    /* Read present data */
	    int err = receive(inBuf);
            if(err < 0) {
            	return 500;
	    }

What about that patch which allways set ContentLength
but try to get others datas only in contentLength is set
and not -1 ....


--- Ajp13.java.orig	Mon Sep 17 11:16:05 2001
+++ Ajp13.java	Mon Sep 17 11:16:30 2001
@@ -411,8 +411,8 @@
 	MessageBytes clB=headers.getValue("content-length");
         int contentLength = (clB==null) ? -1 : clB.getInt();
 	if( dL > 0 ) d("Content-Length: " + contentLength );
-    	if(contentLength != 0) {
-	    req.setContentLength( contentLength );
+        req.setContentLength( contentLength );
+    	if(contentLength != 0 && contentLength != -1) {
 	    /* Read present data */
 	    int err = receive(inBuf);
             if(err < 0) {


Here is the table of working mod_jk / ajp13 

mod_jk 		Ajp13

TC 3.2			TC 3.2		OK
TC 3.2			TC 3.3		DON'T WORKS
TC 3.2			JTC		WORKS

TC 3.3			TC 3.2		WORKS
TC 3.3			TC 3.3		WORKS
TC 3.3			JTC	       WORKS

JTC			TC 3.2		WORKS
JTC			TC 3.3		WORKS (since friday patches)
JTC 			JTC		WORKS




-
Henri Gomez                 ___[_]____
EMAIL : hgomez@slib.fr        (. .)                     
PGP KEY : 697ECEDD    ...oOOo..(_)..oOOo...
PGP Fingerprint : 9DF8 1EA8 ED53 2F39 DC9B 904A 364F 80E6 

Mime
View raw message