Make URL character encoding configurable in URLBuilder
------------------------------------------------------
Key: STS-885
URL: http://www.stripesframework.org/jira/browse/STS-885
Project: Stripes
Issue Type: New Feature
Affects Versions: Release 1.5.7
Environment: Apache Tomcat 7
Reporter: Alessio Stalla
Priority: Minor
The Stripes UrlBuilder (or better the StringUtil class it uses) always
encodes/decodes URLs in UTF-8. It would be useful to provide a way to choose a
different encoding.
Tomcat by default is configured to handle ISO-8859-1 encoded URLs, that is,
when a non-ASCII character is encoded with %nn in a URL, that nn is assumed to
be the code for a character in the ISO-8859-1 charset. It is possible to change
this default in Tomcat on a per-connector basis, but there are cases when our
application runs on a Tomcat installation that we have no control over. This
means that URLs with certain non-ASCII characters (e.g. the euro sign, or
Chinese characters), as well as RedirectResolution and everything else that
uses UrlBuilder, are broken when used on a default Tomcat installation, or one
which has been configured to encode URLs in some encoding different from UTF-8,
since they'll produce URLs with %-encodings that Tomcat interprets in a
different charset, resulting in corruption. And it's pretty much impossible to
override from user code.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development