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

Negative range HTTP requests returning 501 #13201

Closed
domdfcoding opened this issue Mar 13, 2023 · 1 comment
Closed

Negative range HTTP requests returning 501 #13201

domdfcoding opened this issue Mar 13, 2023 · 1 comment
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue

Comments

@domdfcoding
Copy link
Contributor

Describe the bug
Until recently (certainly at least September 2022) it was possible to make HTTP requests to files.pythonhosted.org with the Range header set to e.g. bytes=-100 to get the last 100 bytes of the file. As of March 2023 an error 501 is returned with the message "Unsupported client range".

Expected behavior
The last 100 etc. bytes of the file are returned.

To Reproduce

  • Failing example (last 100 bytes): curl -v -H Range:bytes=-100 https://files.pythonhosted.org/packages/94/e2/0a5630e43ca0b21ca891ec3a697bdb98a25663e27ebd1079ab55e8c68e72/domdf_python_tools-2.9.1-py3-none-any.whl
  • Working example (first 100 bytes): curl -v -H Range:bytes=0-100 https://files.pythonhosted.org/packages/94/e2/0a5630e43ca0b21ca891ec3a697bdb98a25663e27ebd1079ab55e8c68e72/domdf_python_tools-2.9.1-py3-none-any.whl

My Platform
Can reproduce on multiple computers and ISPs in the north and south of England. The connections are to both Fastly's LON and LCY data centres.

Additional context

Requests with a start and end byte (e.g. bytes=100-200) work fine.

@domdfcoding domdfcoding added bug 🐛 requires triaging maintainers need to do initial inspection of issue labels Mar 13, 2023
@miketheman
Copy link
Member

Duplicate of #12823

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 requires triaging maintainers need to do initial inspection of issue
Projects
None yet
Development

No branches or pull requests

3 participants