DO NOT REPLY [Bug 52586] When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value.

2012-02-05 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52586

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #2 from Mark Thomas  2012-02-05 21:58:04 UTC ---
The second time this evening I have had to dig back more than 5 years into the
svn history to figure out why some code is the way it is. It must be code
archaeology week and but no-one bothered to tell me.

That line was added in r301993 which was a modification to 301883 which was an
ugly hack to fix bug 20018.

With the current Tomcat code, there is no need for the hack (I didn't dig into
when the hack became unnecessary) so the line can be removed.

For the record, only the path info was affected and then, only during error
handling.

This has been fixed in trunk and 7.0.x and will be included in 7.0.26 onwards.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 52586] When requests are forwarded, the request attribute javax.servlet.forward.path_info is assigned an incorrect value.

2012-02-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=52586

--- Comment #1 from diego.rivera...@gmail.com  
2012-02-02 21:48:48 UTC ---
The problem seems to be in StandardHostValve, on (or about) line 438:

private boolean custom(Request request, Response response,
 ErrorPage errorPage) {

if (container.getLogger().isDebugEnabled())
container.getLogger().debug("Processing " + errorPage);

request.setPathInfo(errorPage.getLocation());

try {
// Forward control to the specified location
ServletContext servletContext =
request.getContext().getServletContext();

Here, evidently the pathinfo for the request being serviced is set to the
location of the error page being forwarded to:

request.setPathInfo(errorPage.getLocation());

This is evidently incorrect: pathInfo should be set to the path info of the
topmost request on the stack, not the location of the error page being
forwarded to (this explicitly contradicts the Servlet spec).

In my mind, this line should simply not exist.  I'll leave it up to you Tomcat
experts to determine what the impact of that is.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org