You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org> on 2006/09/20 22:33:22 UTC
[jira] Updated: (MYFACES-1152) HTTP Accept header not properly
processed
[ http://issues.apache.org/jira/browse/MYFACES-1152?page=all ]
Martin Marinschek updated MYFACES-1152:
---------------------------------------
Status: Open (was: Patch Available)
> HTTP Accept header not properly processed
> -----------------------------------------
>
> Key: MYFACES-1152
> URL: http://issues.apache.org/jira/browse/MYFACES-1152
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.1
> Reporter: Chris Paulson-Ellis
> Attachments: myfaces-1.1.1-src-content-type-fix.patch
>
>
> In HtmlRendererUtils, the content type is chosen by comparing the HTTP Accept header with a list of supported encodings. However, this comparison does not prioritise the Accept header entries in the correct way, as specified in
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
> In practice, this leads to Firefox (and probably other browsers) being served pages as text/html rather than application/xhtml+xml, even though it states that it prefers the latter.
> On a related note, HtmlRenderKitImpl always chooses ISO-8859-1 as the character encoding. When the content type is XML, the default is UTF-8.
> I've created a patch against 1.1.1 (which I'll attach) that corrects both of these problems.
> I'm not sure why the code works the way it does. Surely without parsing the real rendered response, you cannot know what the content type & encoding is.
> Chris.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira