tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <>
Subject RE: Tomcat 3.2 beta3? problem with mod_jk
Date Wed, 06 Sep 2000 20:05:48 GMT

I finally managed to try your suggestion.  Retrying the read() after the WSAESHUTDOWN was
not successful.

I also did further tests with mod_jk.dll and ApacheModuleJServ.dll.  It appears that maybe
ApacheModuleJServ.dll does a better job of delivering the content to Tomcat, i.e. the content
is either in the buffer or "available" when close is called.  It doesn't arrive while the
close() is occurring, at least when the content is short enough,  However, if I increase the
content length beyond 8K, then ApacheModuleJServ.dll will show the 500 error like mod_jk.dll.

According to the Microsoft documentation, there should be a handshake using shutdown() to
insure content is delivered before closing the socket.  This currently doesn't occur at least
from the Tomcat side of the socket.  Maybe Microsoft could have implemented it better, but
it appears that the arrival of input at the wrong time in socket closure can abort the delivery
of output.

For pre-JDK 1.3, perhaps Ajp12ConnectionHandler.processConnection() could read the content
up to some limit (8k maybe), skip any currently available data, then close the socket.  By
then we can hope the error response has been delivered and closing with a WSAESHUTDOWN error
won't cause a problem.  For JDK 1.3, I think the shutdownInput() and shutdownOutput() should
be used.

Is this too much of a hack?  Suggestions when you get a chance.  Thanks.


-----Original Message-----
From: []
Sent: Thursday, August 31, 2000 6:09 PM
Subject: Re: Tomcat 3.2 beta3? problem with mod_jk

Can you try one more trick:
- if read() returns -1
       1. print errno ( for debug )
       2. if errno == EINTR  ( that should be the case on unix)  or WSASHUTDOWN - go back
and read again.

I'll try to help more next week, I have to finish some work.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message