tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Ploski <>
Subject Error: 304. Apparent bug in 3.3a ErrorHandler code
Date Mon, 11 Feb 2002 01:24:39 GMT

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

I tracked the problem to the method StatusHandler.doService
defined in share/org/apache/tomcat/modules/generators/
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

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 -

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

View raw message