-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Several issues with CacheControl types #2881
Milestone
Comments
They are all >>> from werkzeug.http import parse_cache_control_header
>>> parse_cache_control_header("max-stale").max_stale
'*'
>>> parse_cache_control_header("max-stale=1").max_stale
1
>>> parse_cache_control_header("").max_stale
None
Those have optional arguments and
I agree. iirc Chromium treats max-age without the required argument as if the directive wasn't there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is in three parts:
no-transform
directive always returns NoneThis directive has no arguments (either in current RFC 9111 or older RFC 2616)
Output:
Expected: boolean based on presence
min-fresh
directive returns"*"
if missing required argumentOutput:
Expected:
None
since the argument is required and"*"
doesn't have a semantic meaning for this directive.type stubs are incorrect
no_cache
returnsstr
notbool
.bool
properties never returnNone
max_stale
returns"*"
in addition toint
.RequestCacheControl
immutability is not reflected.Environment:
The text was updated successfully, but these errors were encountered: