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


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.

Reply via email to