Skip to content

Download auto-resume can't help with encrypted unbounded range requests #430

Description

@tjcelaya

Auto-resume is not compatible with unbounded range requests (e.g. Range: byte=50-).

The following line leads to us the end of the request range to Long.MAX_VALUE - hmacSize for AES/CTR and AES/CBC, and some other large value for AES/GCM.

https://github.com/joyent/java-manta/blob/27bd1fd4aba73593cef368ce80807919b89b7e1a/java-manta-client-unshaded/src/main/java/com/joyent/manta/http/EncryptionHttpHelper.java#L1118

which leads to the following check failing when we see that the user requested 0-${Long.MAX_VALUE - hmacSize} but the server responds with Content-Range 0-${content-length - 1} so we can never build a marker:

https://github.com/joyent/java-manta/blob/25c91626f49e81384e1ea64c7f58f92e17296ad9/java-manta-client-unshaded/src/main/java/com/joyent/manta/http/HttpDownloadContinuationMarker.java#L191

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions