Bill Barker wrote:
From: "Remy Maucherat" <[EMAIL PROTECTED]>
[EMAIL PROTECTED] wrote:
markt       2005/01/15 12:27:05

 Modified:    catalina/src/share/org/apache/catalina/core
                       ApplicationHttpRequest.java
 Log:
 Fix bug 28222. request.getRequestURL() in forwarded jsp/servlet returns
   original url rather than new url as per SRV8.4. Uses same code as
   CoyoteRequest.getRequestURL()

I think the bug report may actually be invalid, because: - getRequestURL is not a path element - the javadoc associated with the method is: Reconstructs the URL the client used to make the request. The returned URL contains a protocol, server name, port number, and server path, but it does not include query string parameters.

I don't know for sure, however. Any comments on that ?

I'd tend to go with Remy's interpretation, but it is a grey area in the spec. The javadocs for HttpServletRequest.getRequestURI (which is a path element) say to use the deprecated HttpUtils.getRequestURL to construct a URL, which suggests that HttpUtils.getRequestURL should use the path elements. However the javadocs for HttpUtils.getRequestURL are pretty much the same as for HttpServletRequest.getRequestURL, making the picture a bit grey.


On re-reading the spec it is less clear than I first thought. Personally I favour leaving the patch as is but would be happy to revert it pending clarification from the spec team.


Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to