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

Replication Task Suite restore from DuraCloud fails if "content-length" header is missing

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      2
    • Documentation Status:
      Not Required

      Description

      Reporting this on behalf of the DSpaceDirect service team.  We ran into an issue where a restore of content ("restorefromaip" task) from DuraCloud using the Replication Task Suite fails if DuraCloud does not return a "content-length" header.  While this header is useful, it does not seem to be required, and the entire process fails if a single header is missing.

      This behavior was reproduced with Replication Task Suite v3.4 and DSpace 5.x, but may affect all versions of RTS.

      Specifically, this line of code was throwing a "java.lang.NumberFormatException: null" error: https://github.com/DSpace/dspace-replicate/blob/dspace-replicate-3_x/src/main/java/org/dspace/ctask/replicate/store/DuraCloudObjectStore.java#L79

      The fix/workaround is to not assume that the "content-length" header is always provided. Instead, when it is missing, the Replication Task Suite can determine the downloaded content size by simply checking the size of the downloaded file.  A PR to fix this bug will be posted shortly.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            tdonohue Tim Donohue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: