You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Jan Ploski <jp...@gmx.de> on 2002/02/11 02:24:39 UTC

Error: 304. Apparent bug in 3.3a ErrorHandler code

Hello,

I just stumbled upon a show-stopper problem with Tomcat 3.3a and Apache
mod_jk. When refreshing JSPs that referenced static resources (i.e. a CSS
stylesheet or images), from time to time junk would appear at the top
of the page, saying "Error: 304... Location: <page address>". The said
static resources would not load and the browser would appear to hang
indefinitely.

I tracked the problem to the method StatusHandler.doService
defined in share/org/apache/tomcat/modules/generators/ErrorHandler.java
When the 304 (Not Modified) condition is encountered, this method
generates a message body with the above mentioned "junk" and returns
it to mod_jk.

RFC 2068 states:

   "If the client has performed a conditional GET request and access is
   allowed, but the document has not been modified, the server SHOULD
   respond with this status code. The response MUST NOT contain a
   message-body."

Replacing Tomcat's vanilla ErrorHandler with my own clone with the
whole message body generating block omitted if sc == 304 eliminated
the problem.

Interestingly, the bug could only be demonstrated with mod_jk + Tomcat,
but not when I was using Tomcat alone as a web server.

Can anyone confirm the above observations? If I am correct, what is
the official procedure to submit bug reports and fixes?

Take care -
JPL


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>