Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-4203

One Webapp - Sword Service Validation Issue when deployed to /spring-rest/sword

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: None
    • Component/s: SWORD
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      1
    • Documentation Status:
      Needed

      Description

      Issue Summary from Tim Donohue

      The SWORD error is the SWORD URL validation code causing havoc – the error displayed is saying the URL you posted to isn't matching what SWORD expects (it's very strict, expecting an exact string match). I know I will have to refactor this code in the follow-up PR (when I introduce the dspace.server.url field). So, this seems like something we could consider logging as a "known bug" and assigning me to fix it in the follow-up PR. It's good to hear though that the functionality works fine when deployed as ROOT. I can dig further into what might be going on when deployed on a subpath.

      Background

      ```
      word v1 is working for me when I deploy to ROOT. When it is deployed to spring-rest, I get the following error.

      $ curl -i --data-binary "@sword/example.zip" -H "Content-Disposition:filename=sword/example.zip" -H "Content-Type:application/zip" -H "X-Packaging:http://purl.org/net/sword-types/METSDSpaceSIP" -u test@test.edu:admin -X POST http://localhost:8080/spring-rest/sword/deposit/123456789/4 2>&1
      % Total % Received % Xferd Average Speed Time Time Time Current
      Dload Upload Total Spent Left Speed
      100 34160 0 383 100 33777 3481 299k -::- -::- -::- 303kHTTP/1.1 100

      HTTP/1.1 400
      Content-Type: application/atom+xml;charset=UTF-8
      Transfer-Encoding: chunked
      Date: Thu, 28 Mar 2019 15:37:43 GMT
      Connection: close

      <sword:error xmlns:sword="http://purl.org/net/sword/" xmlns:atom="http://www.w3.org/2005/Atom" href="http://www.dspace.org/ns/sword/1.3.1/
      ```

        Attachments

          Activity

            People

            Assignee:
            tdonohue Tim Donohue
            Reporter:
            terrywbrady Terrence W Brady
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: