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

cache: Support downloading without Content-Length #513

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

spbnick
Copy link
Collaborator

@spbnick spbnick commented Mar 26, 2024

Add support for caching URLs which don't include the Content-Length headers in their response. For now keep downloading fully into memory first, but download even without Content-Length until the limit is hit. Abort the caching if it is.

Update the test to verify the contents of the cached URLs, as now we're messing with it ourselves. Switch to using raw GitHub URLs as samples, as those don't change unless we change them ourselves.

This fixes the test which started failing because GitHub stopped supplying Content-Length on the URLs. This should now enable downloading artifacts from KernelCI and possibly others. Although we'll still be downloading only 1/256th of them.

Add support for caching URLs which don't include the Content-Length
headers in their response. For now keep downloading fully into memory
first, but download even without Content-Length until the limit is hit.
Abort the caching if it is.

Update the test to verify the contents of the cached URLs, as now we're
messing with it ourselves. Switch to using raw GitHub URLs as samples,
as those don't change unless we change them ourselves.

This fixes the test which started failing because GitHub stopped
supplying Content-Length on the URLs. This should now enable downloading
artifacts from KernelCI and possibly others. Although we'll still be
downloading only 1/256th of them.
@spbnick spbnick merged commit 5f9cf4b into main Mar 26, 2024
5 checks passed
@spbnick spbnick deleted the support_caching_without_content_length branch March 26, 2024 19:11
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.

1 participant