Bug 48223

Summary: IIS Logs HTTP status code 200 instead of error code
Product: Tomcat Connectors Reporter: Bjoern Andersen <bjoern>
Component: isapiAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 1.2.28   
Target Milestone: ---   
Hardware: PC   
OS: Windows Server 2003   
Attachments: Set status code retrieved from backend

Description Bjoern Andersen 2009-11-18 02:37:28 UTC
We have several applications running in an TC 5.0.28 behind a IIS 6 cluster with JK 1.2.28 isapi.
The Applications are configured to serve custom error pages:
web.xml:
...
	<error-page>
		<error-code>404</error-code> 
		<location>/cms/fehler/404.jsp</location> 
	</error-page>
	<error-page>
		<error-code>500</error-code> 
		<location>/cms/fehler/500.jsp</location> 
	</error-page>
...
When an error occours, these pages are rendered and send to the User as expected.
The HTTP data on the user end also shows the correct error code.
wfetch output:
...
    started....WWWConnect::Connect("www.mypage.de","80")
    IP = "xxx.xxx.xxx.38:80"
    source port: 4712\r
    REQUEST: **************
    GET /xxx/modules/abo/siebel/selling/mgm/premium_detailo.jsp HTTP/1.1\r
    Host: www.sky.de\r
    Accept: */*\r
    \r
    RESPONSE: **************
    HTTP/1.1 404 /modules/abo/siebel/selling/mgm/premium_detailo.jsp\r
    Connection: close\r
    Date: Wed, 18 Nov 2009 10:14:23 GMT\r
    Server: Microsoft-IIS/6.0\r
    X-Powered-By: ASP.NET\r
    Cache-Control: private, no-cache\r
    Pragma: no-cache\r
    Expires: Thu, 01 Jan 1970 00:00:00 GMT\r
    Content-Type: text/html;charset=ISO-8859-1\r
    \r
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
...

But in the IIS Logfile, a status code 200 is logged:
...
2009-11-18 10:31:10 GET /xxx/modules/abo/siebel/selling/mgm/premium_detailo.jsp - - xxx.xxx.xxx.35 HTTP/1.1 - - 200 27863 140
...
This is verified for code 404 and 500 on our systems, but I expect other codes act the same way. In IIS, we also configured static custom error pages, but not for "Internal Server  Error 500". So it can't be that.

This disturbs statistics, monitoring and bugfixing. Please fix or help.

thank you
Björn
Comment 1 Rainer Jung 2009-12-21 10:18:33 UTC
Created attachment 24748 [details]
Set status code retrieved from backend

Still need to test, whether this triggers some additional error response form IIS. Guess no.
Comment 2 Rainer Jung 2010-02-17 15:33:57 UTC
Patch committed in r911020. Will be released with 1.2.29.