Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-18730

XML content encoded with UTF-16 can't be downloaded from Share's proxy

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      00932845

    • Sprint:
      Puccini
    • Work Funnel End:
      2019-02
    • Story Points:
      3
    • Prioritization Score:
      1.875

      Description

      If I upload an XML file encoded with UTF-16 and try to get the file content through the alfresco node service, an empty document is returned:

      http://host:port/share/proxy/alfresco/api/node/workspace/SpacesStore/UUID/content

      However, the file's content can be gotten without problem requesting the repo service directly:

      http://host:port/alfresco/service/api/node/workspace/SpacesStore/UUID/content

      Uploading a copy of the same file encoded with UTF-8 turns out in no problems.

       

      I could find out that the root cause resides in:

      org.alfresco.web.scripts.SlingshotRemoteClient#copyResponseStreamOutput

      because the InputStream created from response.getEntity().getContent() doesn't take into account the file's encoding, resulting in several wrong characters.

       

      I attached an XML file encoded with UTF-16 and a sample of the read characters.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs (Inactive)
                Reporter:
                juliomaqueda Julio Maqueda (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Structure Helper Panel