Bugs item #3510197, was opened at 2012-03-22 12:49
Message generated for change (Tracker Item Submitted) made by adamdesmith
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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Adam Smith (adamdesmith)
Assigned to: Nobody/Anonymous (nobody)
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=3510197&group_id=4866

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to