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

Add graceful fallback for Artifactory indexes #1574

Merged
merged 1 commit into from
Feb 17, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

There are more details in #1370, but it looks like Artifactory servers have incorrect behavior when it comes to HTTP range requests, in that they return Accept-Ranges: bytes, but then incorrectly return 200 requests when you actually ask for a given range.

This PR ensures that we fallback gracefully in this case. It's built on prefix-dev/async_http_range_reader#5. Assuming that gets merged upstream, we can then remove the Git dependency.

Closes #1370.

Test Plan

cargo run pip install requests -i https://killjoyuvbug.jfrog.io/artifactory/api/pypi/pypi/simple --verbose

Cargo.toml Outdated
@@ -21,7 +21,7 @@ anstream = { version = "0.6.5" }
anyhow = { version = "1.0.79" }
async-compression = { version = "0.4.6" }
async-trait = { version = "0.1.77" }
async_http_range_reader = { version = "0.5.0" }
async_http_range_reader = { git = "https://github.com/charliermarsh/async_http_range_reader", rev = "725e69903e637c9ff66360fa74a1b494d7c47d29" }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged and released with many thanks to @baszalmstra!

@charliermarsh charliermarsh added the bug Something isn't working label Feb 17, 2024
@charliermarsh charliermarsh merged commit facc60f into main Feb 17, 2024
7 checks passed
@charliermarsh charliermarsh deleted the charlie/slice branch February 17, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal error: entered unreachable code
2 participants