Bugs item #3510197, was opened at 2012-03-22 12:49
Message generated for change (Comment added) made by cito
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=3510197&group_id=4866
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: WebKit
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Adam Smith (adamdesmith)
>Assigned to: Christoph Zwerschke (cito)
Summary: HTTPRequest.serverPath() fallback fails on forwarding
Initial Comment:
HTTPRequest.serverPath() is supposed to return the path given to the web server before any rewrites. If the SCRIPT_URL values is set, it does this correctly. If is not, it falls back to constructing this path from the _servletPath and _pathInfo variables.
However, consider the case when a request is forwarded from one servlet to another (via Application.forward). In this case, _pathInfo gets rewritten (forward calls includeURL, which calls HTTPRequest.push(), which then rewrites _pathInfo via setURLPath()). Now HTTPRequest.serverURL() returns not the originally requested URL, but instead the URL of the servlet that WebKit has forwarded the request to.
As _pathInfo cannot reliably provide the serverPath, it should not be used in a fallback. Instead, it should attempt to extract a path from SCRIPT_URI and/or REQUEST_URI (perhaps using python's urlparse module). If neither are set, an exception should be raised rather than provide the client with potentially incorrect data.
----------------------------------------------------------------------
>Comment By: Christoph Zwerschke (cito)
Date: 2013-01-17 12:06
Message:
Sorry, for leaving this open for so long. Fixed now in r8249.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=3510197&group_id=4866
|