tomcat-users mailing list archives

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

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 6.0.26.0 and 7.0.12.0:

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?

Regards,
Mindaugas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message