fix(cache): deduplicate Cache-Control directives case-insensitively (#5025)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
The cache middleware extracted existing Cache-Control directive names without lower-casing them, then compared against its own lower-cased directive names. Cache-Control directive names are case-insensitive (RFC 7234), so a handler-set `Max-Age=3600` was not recognised as a duplicate of a configured `max-age=10` and a contradictory directive was appended. Lower-case the extracted names so the de-dup check matches regardless of case.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Trailers
- Co-authored-by: nyxst4ck <289980115+nyxst4ck@users.noreply.github.com>
Diff stats
2 files+19 added−1 removed
- tests:+15 added−0 removed
- other:+4 added−1 removed