Bug 58768

Summary: Add Logging to Response.sendRedirect
Product: Tomcat 7 Reporter: George Sexton <gsexton>
Component: Servlet & JSP APIAssignee: Tomcat Developers Mailing List <dev>
Severity: enhancement    
Priority: P2    
Version: 7.0.67   
Target Milestone: ---   
Hardware: PC   
OS: All   

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.