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
File Cache Control Headers Support #2447
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2447 +/- ##
=========================================
Coverage 87.246% 87.247%
=========================================
Files 60 60
Lines 5073 5089 +16
Branches 907 912 +5
=========================================
+ Hits 4426 4440 +14
Misses 476 476
- Partials 171 173 +2
Continue to review full report at Codecov.
|
3f8cfb4
to
d18b286
Compare
@sanic-org/framework @ahopkins May I have some feedbacks about the draft? Thanks! |
@ChihweiLHBird Please avoid force pushing on PRs. Use normal push so that the notification don't give an error about commits not being found. |
Thanks. Sorry about that, and I didn't know that before. I wanted to undo the commit because the change was messed up. Won't do it in the future PRs. |
Marking it as a draft. Change it back when it is ready for final review 😎 |
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.
This is a good first step, but I wonder if we should raise a warning or something if cache-control
was set in the headers
? Will merge as is, but we can think about this for the next round.
How to? Maybe mention it in the docs? Or have a parameter called something like |
Related issue: #2441
Would like to get some feedback about the implementation.
The behavior was made to be similar to
Werkzeug
. But I think we can only keep the auto headers option (and removelast_modified
) since it is a fact from the file stat and user can still override the it with aheaders
dictionary passed in.