You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/05/20 19:10:34 UTC

DO NOT REPLY [Bug 9252] New: - Tomcat sometimes posts HTML Error Pages as text/plain instead of text/html.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9252>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9252

Tomcat sometimes posts HTML Error Pages as text/plain instead of text/html.

           Summary: Tomcat sometimes posts HTML Error Pages as text/plain
                    instead of text/html.
           Product: Tomcat 4
           Version: 4.0.3 Final
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: James.Schatzman@fu-lab.com


Apache Tomcat does not always identify error pages as text/html.

http://site/application/bad-name.html  -> text/html 404 error page

http://wite/application/bad-name  -> text/plain 404 error page

http://wite/application/bad-name.xxx (or any suffix other than html
         or htm)  -> text/plain 404 error page

IE (unfortunately) accepts the pages as html anyway, but Netscape
and other browsers do not.  The user sees the html source instead of the
formatted error page.

A typical error page from Tomcat is:

<html><head><title>Apache Tomcat/4.0.3 - Error 
report</title><STYLE><!--H1{font-family : sans-serif,Arial,Tahoma;color : 
white;background-color : #0086b2;} BODY{font-family : 
sans-serif,Arial,Tahoma;color : black;background-color : white;} B{color : 
white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE> 
</head><body><h1>Apache Tomcat/4.0.3 - HTTP Status 404 - /bad</h1><HR size="1" 
noshade><p><b>type</b> Status report</p><p><b>message</b> 
<u>/bad</u></p><p><b>description</b> <u>The requested resource (/bad) is not 
available.</u></p><HR size="1" noshade></body></html>

which is fine, except that the mime type is identified as text/html.

Non-Tomcat URIs have no problem - Apache correctly produces text/html
error pages. It is only Tomcat-intercepted URIs that exhibit the problem.
This is Apache 1.3.23, Tomcat 4.0.3.

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