You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/05/08 00:23:31 UTC

[Bug 54882] HttpServletRequest.getRequestURI() returns also fragment

https://issues.apache.org/bugzilla/show_bug.cgi?id=54882

--- Comment #8 from Konstantin Preißer <pr...@web.de> ---
To follow-up on this report:

I tested with current IE 10 and old IE 8 and cannot reproduce the behavior
described in this report.

When I submit a URL like "test.html#fragment" to a XMLHttpRequest in
Javascript, IE will send the following request to the server:

GET /test.html%23fragment HTTP/1.1
... [other headers]

which should be a valid URL (it would request a file called
"test.html#fragment").

HttpServletRequest.getRequestURI() on Tomcat 7.0.40 correctly returns
"/test.html%23fragment" in such a case.


So I don't think there is a IE bug here - maybe it could be called a "feature"
as it seems that IE's XMLHttpRequest treats a "#" as a character that was
forgotten to be encoded, since a fragment would not make sense for the
XMLHttpRequest, and therefore encodes it. This, however, does not match
behavior of other browsers like Firefox and Chrome, where the XMLHttpRequest
remove the "#"-part of the URL.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org