Bug 15406

Summary: error-page responses are sent with wrong status code!
Product: Tomcat 4 Reporter: Donald Ball <dball>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: major    
Priority: P3    
Version: 4.1.12   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: here is a patch against cvs head from 2002-12-30

Description Donald Ball 2002-12-16 18:16:33 UTC
I recently had occasion to use the error-page facility of web.xml with tomcat
4.x for the first time. To my surprise, tomcat sends a 200 status code with the
content, regardless of what the original error code is! As far as I can tell,
this is totally incorrect behavior. I regard it as a "major" bug because it's
essentially "censoring" the http conversation between client and webapp, and
makes it impossible for search engines, et. al., to distinguish between good and
bad urls.

I have verified this behavior in jakarta-tomcat-4.0.6 and 4.1.12 in standalone
mode. I have not tested it with any of the connectors. I am happy to help
contribute a patch if the developers agree this is a bug but have not the time
to fix it.
Comment 1 Donald Ball 2002-12-30 16:16:53 UTC
Created attachment 4297 [details]
here is a patch against cvs head from 2002-12-30
Comment 2 Donald Ball 2003-01-15 17:15:03 UTC
craig insists that the current behavior is correct, that it's the responsibility
of the referred resource to set the response code.