tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mindaugas Žakšauskas <>
Subject Semicolon URI encoding and RFC
Date Mon, 09 May 2011 10:32:02 GMT

I was trying to read RFCs 3986 and 2396 to understand some subtleties
about URI encoding.

In particular I am interested about whether semicolon (;) needs to be
percent escaped as, e.g. http://site/some;path VS
http://site/some%3Bpath when outputting e.g. HTML href element.

Just for interest, here's what I get in both Tomcat and

href URI           ((HttpServletRequest) request).getServletPath()

http://site/foo                        /foo
http://site/test1;test2             /test1
http://site/test1%3Btest2       /test1;test2
http://site/test1)test2/            /test1)test2/

According to RFC 3986, both semicolon and closing bracket ')' belongs
to sub-delims class but one needs escaping and another doesn't. Is
this expected behaviour? I have asked this question on StackOverflow,
and the answerer guessed that Tomcat is following older RFC 2396. Can
anyone clarify?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message