[MAGNOLIA-3264] UnicodeNormalizerRequestWrapper.getParameterMap() may return a stale result in case of forwards Created: 03/Aug/10 Updated: 26/Oct/10 Resolved: 20/Oct/10 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | None |
| Affects Version/s: | 4.3.5 |
| Fix Version/s: | 4.3.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | Fabrizio Giustina | Assignee: | Ondrej Chytil |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
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. 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 |
| Comments |
| Comment by Ondrej Chytil [ 20/Oct/10 ] |
|
Resolved with |