Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix KeyError: 'ContentRange' when received full content from S3 #789

Merged
merged 5 commits into from
Feb 21, 2024
Merged

Fix KeyError: 'ContentRange' when received full content from S3 #789

merged 5 commits into from
Feb 21, 2024

Conversation

messense
Copy link
Contributor

@messense messense commented Nov 3, 2023

Motivation

https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests#partial_request_responses

If range requests are not supported, an 200 OK status is sent back and the entire response body is transmitted.

In case there is a proxy between s3 and end user, range requests may not be supported.

Fixes #686

Checklist

Before you create the PR, please make sure you have:

  • Picked a concise, informative and complete title
  • Clearly explained the motivation behind the PR
  • Linked to any existing issues that your PR will be solving
  • Included tests for any new functionality
  • Checked that all unit tests pass

@mpenkov
Copy link
Collaborator

mpenkov commented Feb 21, 2024

Thank you!

@mpenkov mpenkov merged commit 2cba857 into piskvorky:develop Feb 21, 2024
21 checks passed
ddelange added a commit to ddelange/smart_open that referenced this pull request Feb 21, 2024
…open into patch-2

* 'develop' of https://github.com/RaRe-Technologies/smart_open:
  Propagate __exit__ call to underlying filestream (piskvorky#786)
  Retry finalizing multipart s3 upload (piskvorky#785)
  Fix `KeyError: 'ContentRange'` when received full content from S3 (piskvorky#789)
  Add support for SSH connection via aliases from `~/.ssh/config` (piskvorky#790)
  Make calls to smart_open.open() for GCS 1000x faster by avoiding unnecessary GCS API call (piskvorky#788)
  Add zstandard compression feature (piskvorky#801)
  Support moto 4 & 5 (piskvorky#802)
  Secure the connection using SSL when connecting to the FTPS server (piskvorky#793)
  upgrade dev status classifier to stable (piskvorky#798)
  Fix formatting of python code (piskvorky#795)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing ContentRange in the response from AWS
2 participants