[ http://jira.magnolia.info/browse/MAGNOLIA-1512?page=comments#action_13982 
] 
            
Grégory Joseph commented on MAGNOLIA-1512:
------------------------------------------

Actually, with MAGNOLIA-1523 cleaning up a number of Aggregator / Path cruft, 
this could still all happen in the ContentTypeFilter - eventhough it will still 
be wrong to set the *request's* encoding based on what url is requested, 
instead of one what page it's coming from. We could base ourself on the 
referer's uri, but that seems unclean, too.

Normally, the browser should send a character set in the request, and if so, 
the container SHOULD take into account, only falling back to iso-8859-1 if 
that's not the case. It is still unclear what tomcat really does, but I've 
noticed my firefox does not send any charset header in its requests, even if 
the originating page has meta tags, form enctype attribute etc ...

> Request charset should be set before any req.getParameter call
> --------------------------------------------------------------
>
>                 Key: MAGNOLIA-1512
>                 URL: http://jira.magnolia.info/browse/MAGNOLIA-1512
>             Project: Magnolia
>          Issue Type: New Feature
>          Components: core
>            Reporter: Grégory Joseph
>         Assigned To: Grégory Joseph
>             Fix For: 3.1 M2
>
>
> At the moment, the request charset is set using Aggregator.getExtension(), 
> which in turns uses Context.getAttribute. Since the WebContextImpl 
> implementation of getAttribute calls getParameter in case the attribute does 
> not exist on the request, thus making the setCharacterSet call useless - and 
> preventing parameters to be parsed properly (indeed, the container will parse 
> them on the first call to getParam*() with a default encoding - iso-8859-1 in 
> the case of tomcat) 
> We might solve this by making the Aggregator.getExtension method (and 
> associated) just using the context attribute - which have to be set 
> previously, for instance by a new filter that has yet to be created.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/developer.html
----------------------------------------------------------------

Reply via email to