ResourceResponse.setContentType() with charset is broken.
---------------------------------------------------------

                 Key: PLUTO-561
                 URL: https://issues.apache.org/jira/browse/PLUTO-561
             Project: Pluto
          Issue Type: Bug
          Components: portlet container
    Affects Versions: 2.0.0
            Reporter: Michael Freedman


ResourceResponseImpl.setCharacterSetEncoding (and setContentType) has problems. 
 If the content type contains a charset (text/xml;charset=utf-8), the 
setContentType calls setCharacterSetEncoding on "charset=utf-8" vs. utf-8.  And 
setCharacterSetEncoding doesn't adjust accordingly.  Also 
setCharacterSetEncoding using a previous (data member) value to set the 
responseContext vs. the new one passed in.  Altogether it breaks resources that 
set a contenttype that includes a charset.  I have attached a patch file that 
addresses these problems by altering setCharacterSetEncoding to deal with 
strings that contain the full charset=xxxx encoding.  You might prefer instead 
to just fix setContentType to do the right thing and require/expect all clients 
to also do the right thing.

-- 
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