Closed
Description
This issue is in three parts:
no-transform
directive always returns None
This directive has no arguments (either in current RFC 9111 or older RFC 2616)
from werkzeug.http import parse_cache_control_header
cc = parse_cache_control_header("no-transform")
print(f"{cc.no_transform=}")
Output:
cc.no_transform=None
Expected: boolean based on presence
min-fresh
directive returns "*"
if missing required argument
from werkzeug.http import parse_cache_control_header
cc = parse_cache_control_header("min-fresh")
print(f"{cc.min_fresh=}")
Output:
cc.min_fresh='*'
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:
- Python version: N/A
- Werkzeug version: 3.0.2
Metadata
Assignees
Labels
No labels
Activity