-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Remove case sensitivity of Etag header for use_etag #61441
Remove case sensitivity of Etag header for use_etag #61441
Conversation
re-run full all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
re-run all |
Hi @nicholasmhughes thanks for doing this. A better method would be to write the whole header to a different file instead of using a file specific for etag. There are many ways to determine if a file should be cached from a web server. Keeping the whole header in a filename.meta file allows not only etag to be used but other techniques, like if-not-modified-since using the date from save header which is in the same format as what the web server provided (instead of try to create it). Instead of Here is some sample code, loading meta data, back into a case insensitive data structure.
Not sure why salt does not use the request library. How are you handling failures/partial downloads? |
@damon-atkins , totally understand the broader metadata perspective. However, I'm not really in a spot to address that at this time. Regarding handling failures/partial downloads, the code additions for |
What does this PR do?
See issue.
What issues does this PR fix or reference?
Fixes: #61440
Merge requirements satisfied?
[NOTICE] Bug fixes or features added to Salt require tests.
Commits signed with GPG?
Yes
Please review Salt's Contributing Guide for best practices.
See GitHub's page on GPG signing for more information about signing commits with GPG.