fix(static): support HEAD without opening files#2645
Conversation
vytas7
left a comment
There was a problem hiding this comment.
Hey, and thanks for this PR.
Please check the failing CI, most of the gates fail on your changes.
|
Hi again @paulkagiri, have you have a chance to review the CI failures? |
|
Addressed the CI failures from the review. Changes made:
Validation:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2645 +/- ##
===========================================
- Coverage 100.00% 99.87% -0.13%
===========================================
Files 64 64
Lines 7976 8010 +34
Branches 1102 1109 +7
===========================================
+ Hits 7976 8000 +24
- Misses 0 8 +8
- Partials 0 2 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Can you please run |
Summary of Changes
Static routes now handle
HEADseparately fromGET: they compute the same response metadata without opening a file stream, preserve range headers for rangedHEADrequests, and return405 Method Not Allowedfor unsupported methods.OPTIONSnow advertises bothGETandHEAD.Related Issues
Closes #2337
Pull Request Checklist
tox.docs/_newsfragments/, with the file name format{issue_number}.{fragment_type}.rst.Testing performed:
python -m pytest tests/test_static.py -qgit diff --check