|
[ jetty-Bugs-1031520 ] Incorrect status code after handling by error page: msg#00066java.jetty.general
Bugs item #1031520, was opened at 2004-09-20 13:42 Message generated for change (Settings changed) made by jboynes You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1031520&group_id=7322 Category: Servlets Group: None >Status: Closed Resolution: Fixed Priority: 5 Submitted By: Jeremy Boynes (jboynes) Assigned to: Jeremy Boynes (jboynes) Summary: Incorrect status code after handling by error page Initial Comment: If a servlet raises an exception (say in init) which is handled by an error page, a 200 status code is returned to the client. Instead 500 should be returned to indicate a problem occurred. ---------------------------------------------------------------------- Comment By: Greg Wilkins (gregwilkins) Date: 2004-09-23 16:34 Message: Logged In: YES user_id=44062 OK - I got it now. Jetty should never be converting arbitrary exceptions into UnavailableExceptions. It is only a servlet that should generate an UnavailableException. which is good as I could not wrap the root cause with an unavailable exception. Fixed (hopefully) in CVS now. ---------------------------------------------------------------------- Comment By: Jeremy Boynes (jboynes) Date: 2004-09-23 11:23 Message: Logged In: YES user_id=378919 Last try :-) If the init method throws a ServletException, the ServletHolder converts this to a permanent UnavailableException. Instead it should not put this instance into service but should attempt to reinit on a subsequent request. As the servlet is not permanently unavailable then the server should return 500 not 404. Attach is a patch that may fix the problem. ---------------------------------------------------------------------- Comment By: Greg Wilkins (gregwilkins) Date: 2004-09-23 01:55 Message: Logged In: YES user_id=44062 fixed again ---------------------------------------------------------------------- Comment By: Jeremy Boynes (jboynes) Date: 2004-09-21 21:02 Message: Logged In: YES user_id=378919 Some other change, maybe for the unwrapping, had made this revert from 404 to 200. ---------------------------------------------------------------------- Comment By: Jeremy Boynes (jboynes) Date: 2004-09-21 09:46 Message: Logged In: YES user_id=378919 I think due to conflict with #1031543, we are now getting a 404 response rather than the 500 expected. This may be because we are treating the ServletException from init the same as a permanent UnavailableException. ---------------------------------------------------------------------- Comment By: Greg Wilkins (gregwilkins) Date: 2004-09-21 05:36 Message: Logged In: YES user_id=44062 Thanks for the test case. fixed in CVS ---------------------------------------------------------------------- Comment By: Jeremy Boynes (jboynes) Date: 2004-09-20 23:08 Message: Logged In: YES user_id=378919 Attached is a simple maven project that reproduces the problem. Deploy the war and then run the command line client; the status code output from the client should be 500 not 200. ---------------------------------------------------------------------- Comment By: Greg Wilkins (gregwilkins) Date: 2004-09-20 21:51 Message: Logged In: YES user_id=44062 Do you know if the test is trying to reset the status code in the error page? I assume so, otherwise I can't reproduce? I'll proceed by disabling setStatus and perhaps sendError once and error has been sent. not sure how sendError should be handled in and error page??? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1031520&group_id=7322 ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ jetty-Bugs-1033753 ] j.s.i.query_string should just be that from the URI, SourceForge.net |
|---|---|
| Next by Date: | [ jetty-Bugs-1033753 ] j.s.i.query_string should just be that from the URI, SourceForge.net |
| Previous by Thread: | [ jetty-Bugs-1031520 ] Incorrect status code after handling by error page, SourceForge.net |
| Next by Thread: | [ jetty-Bugs-1033643 ] setLocale ignores <locale-encoding-mapping-list> in web.xml, SourceForge.net |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |