Bug 58768 - Add Logging to Response.sendRedirect
Summary: Add Logging to Response.sendRedirect
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Servlet & JSP API (show other bugs)
Version: 7.0.67
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2015-12-24 16:24 UTC by George Sexton
Modified: 2019-06-12 15:17 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description George Sexton 2015-12-24 16:24:55 UTC
The new behavior introduced in:


Can cause strange and mysterious errors. For example, passing an invalid value fo sendRedirect():

response.sendRedirect("SomePage.html?value=Some Word")

will now generate a 404 error indicating that the page containing the sendRedirect() call is not found. In this case the real error is that the parameter is not URI encoded.

Additionally, because of the manner it's called, no diagnostic page is generated. The developer is left scratching their head wonder what went wrong.

It would be very helpful if the IllegalArgumentException that get's caught in o.a.c.c.Response at line 1412 could be logged.
Comment 1 Mark Thomas 2016-01-30 00:56:23 UTC
Fixed in trunk for 9.0.0.M3 onwards, 8.0.x for 8.0.32 onwards and 7.0.x for 7.0.68 onwards.