-
Bug
-
Resolution: Duplicate
-
Major
-
4.3.5
-
None
-
None
When utf8 is enabled, forwards with added parameters may not work correctly due to unicode normalization which doesn't "see" added parameters.
For example, if you have a regexp virtual uri with:
^/my/path/(.*)\.html forward://my/path/page.html?product=$1
the "product" parameter is seen in the destination page only if uft8 is disabled.
This is due to the getParameterMap() method in UnicodeNormalizerRequestWrapper which caches the map with normalized parameters after the forward:
public Map getParameterMap() { if (parameters == null) { parameters = new HashMap<String, String[]>(); for (Object key : original.getParameterMap().keySet()) { String[] value = transform((String[]) original.getParameterMap().get(key)); parameters.put(key, value); } } return parameters; }
removing the " if (parameters == null)" check and making normalization all the times is enough to fix it, but this will add an unwanted overhead. We should find a way to re-normalize the parameter map only when the request gets overridden
- caused by
-
MAGNOLIA-3337 Request Wrappers hide changes in upstream wrappers
- Closed
- is related to
-
MAGNOLIA-3310 UnicodeNormalizationFilter seems to be messing up the virtualUriMappings
- Closed