myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Paulson-Ellis (JIRA)" <>
Subject [jira] Created: (MYFACES-1152) HTTP Accept header not properly processed
Date Thu, 23 Feb 2006 17:19:38 GMT
HTTP Accept header not properly processed

         Key: MYFACES-1152
     Project: MyFaces Core
        Type: Bug
  Components: General  
    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

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.


This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message