You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mark Struberg (JIRA)" <de...@myfaces.apache.org> on 2010/12/06 20:26:10 UTC

[jira] Resolved: (MYFACES-2984) Myfaces should return a proper contentType if ResourceWrapper doesn't return one.

     [ https://issues.apache.org/jira/browse/MYFACES-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved MYFACES-2984.
------------------------------------

    Resolution: Fixed

fixed by recursively 'unwrapping' the resourceName...

> Myfaces should return a proper contentType if ResourceWrapper doesn't return one.
> ---------------------------------------------------------------------------------
>
>                 Key: MYFACES-2984
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2984
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2
>            Reporter: Mark Struberg
>            Assignee: Jakob Korherr
>             Fix For: 2.0.3-SNAPSHOT
>
>
> Since ResourceWrapper doesn't wrap getContentType (is not defined as abstract in the 2.0 spec) some component libraries (namely primefaces) do not return a proper content type. 
> Currently MyFaces directly sets this value in ResourceHandlerImpl.java. In case the wrapper doesn't define an own content type, we end up passing null to the response. 
> In this case the servlet container guesses the content type depending on the extension of the request URL. For the classic *.xhtml mapping we now get text/xhtml for each and every resource request (which leads to broken detection of css and images for example).
> TODO: we should check if the wrapper returns null and ask the external context for the proper content type in this case.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.