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/07/01 13:22:38 UTC
DO NOT REPLY [Bug 10373] New: -
Wrong response status code for custom error page
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=10373>.
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=10373
Wrong response status code for custom error page
Summary: Wrong response status code for custom error page
Product: Tomcat 4
Version: 4.0.4 Final
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: anatoli@aksoft.net
Hi
If I don't specify <error-page> for code 401 (unauthorized) in web.xml - all
works fine.
But if I specify it then the server sends the page with code 200 (I see it in
log), and browser does not show the name/password popup.
That is because org.apache.catalina.valves.ErrorDispatcherValve resets state of
response in method custom.
I've tried to comment the call out and it works, but I'm not sure that I don't
need the reset really. It would be better to call reset and then restore
state/message, but javax.servlet.http.HttpServletResponse has no getState() method.
So, problem is in file org/apache/catalina/valves/ErrorDispatcherValve.java,
line 384.
Hope, you can find a better solution :)
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>