Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-4146

json extension is removed by AbstractWebdavServlet on COPY request

    XMLWordPrintableJSON

Details

    Description

      This issue was first observed via crxDE: the user did a copy / paste on a node with the .json extension (let's say test.json). After saving, the new node was named "Copy of test" instead of "Copy of test.json".

      I tracked the request to the AbstractWebdavServlet.doCopy method - and this is where the .json extension seems to be lost.
      The Destination header sent by crxde includes the extension, but the new resource created in doCopy does not have it.
      The request looked like this:

      curl -u admin:admin 'http://localhost:4502/crx/server/crx.default/jcr%3aroot/libs/test.json' -X COPY -H 'Overwrite: T' -H 'Destination: /crx/server/crx.default/jcr%3aroot/libs/Copy%20of%20test.json' -v
      

      To rule out issues in other layers, I tested with the Jackrabbit 2.14.x standalone.
      I uploaded the test.json file via WebDav, then executed the following curl request:

      curl -u admin:admin 'http://localhost:9001/server/default/jcr:root/test.json' -X COPY -H 'Overwrite: T' -H 'Destination: /server/default/jcr:root/copytest.json' -v
      

      The new node was created, but instead of being named "copytest.json", it is called "copytest".

      Attachments

        1. JCR-4146-2.diff
          10 kB
          Julian Reschke
        2. JCR-4146.diff
          12 kB
          Julian Reschke

        Activity

          People

            reschke Julian Reschke
            ana.vinatoru Ana Vinatoru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: