[ http://issues.apache.org/jira/browse/MYFACES-1152?page=comments#action_12436337 ] Martin Marinschek commented on MYFACES-1152: --------------------------------------------
Sorry for the delay, but this patch is not working anymore with the current head (I think it didn't work anymore in February with the current head either). If you get in a new patch which is based on current head, I'll submit it. regards, Martin > 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