Issue 104 in urlrewritefilter: Tomcat's URIEncoding="UTF-8" is ignored by UrlRewriteFilter

64 views
Skip to first unread message

urlrewri...@googlecode.com

unread,
Feb 23, 2012, 8:06:09 AM2/23/12
to urlre...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 104 by gcol...@gmail.com: Tomcat's URIEncoding="UTF-8" is
ignored by UrlRewriteFilter
http://code.google.com/p/urlrewritefilter/issues/detail?id=104

What steps will reproduce the problem?

1. Add the attribute URIEncoding="UTF-8" to Tomcat's
server.xml "<Connector>" tag.

2. Create a simple JSP page (e.g. "search.jsp") that prints out the "item"
parameter.

3. Call this JSP directly with an UTF-8 encoded URL, like :

http://localhost:8080/MyProject/search.jsp?item=m%C3%A9tro

The parameter is "métro" encoded in UTF-8, and it is correctly decoded by
Tomcat with respect to the URIEncoding="UTF-8" option.

4. Now, set up URL Rewrite Filter with the following rule :

<urlrewrite use-query-string="true" decode-using="UTF-8">
<rule match-type="regex">
<from>^/recherche\?item=([%\+\-0-9a-zA-Z;]+)$</from>
<to>/search.jsp?item=$1</to>
</rule>
</urlrewrite>

5. Call your JSP through the address :
http://localhost:8080/MyProject/recherche?item=m%C3%A9tro



What is the expected output? What do you see instead?

It should return "métro", just like the direct call to the JSP. Instead, it
displays the ISO-8859-1 string : "métro".



What version of the product are you using? On what operating system?

Tomcat 7 and URL Rewrite Filter 3.2



Please provide any additional information below.


urlrewri...@googlecode.com

unread,
Jun 22, 2015, 5:09:40 AM6/22/15
to urlre...@googlegroups.com

Comment #1 on issue 104 by krzyszto...@gmail.com: Tomcat's
URIEncoding="UTF-8" is ignored by UrlRewriteFilter
https://code.google.com/p/urlrewritefilter/issues/detail?id=104

Same problem with urlrewrite distributed with liferay 6.2 GA4

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages