Skip to content

S3 suffix-range GET on a zero-byte object returns private NotPartial wrapped as Error::Generic #846

Description

@rodesai

Describe the bug

Requesting a suffix range from an existing zero-byte S3 object fails with Error::Generic(GetResultError::NotPartial). S3 returns a 200 for the suffix-range GET when the object is 0 bytes, but object_store expects a 206.

To Reproduce

  let options =
      GetOptions::new().with_range(Some(GetRange::Suffix(512 * 1024)));
  let result = store.get_opts(&path, options).await;

For a zero-byte object, AWS S3 responds with:

  HTTP/1.1 200 OK
  Content-Length: 0

Expected behavior
Either the call should return success, or fail with some error with a specific type that the caller can use to discriminate and handle this case specifically (e.g. by falling back to a HEAD).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions