Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-561

ResourceResponse.setContentType() with charset is broken.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: portlet container
    • Labels:
      None

      Description

      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.

        Attachments

        1. pluto_561.patch
          1 kB
          Michael Freedman

          Activity

            People

            • Assignee:
              adouma Ate Douma
              Reporter:
              mike_freedman Michael Freedman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: