Mercurial > p > roundup > code
diff roundup/cgi/KeywordsExpr.py @ 8019:16cc72cd9c17
fix: Send Vary: Accept-Encoding on any data that could be compressed
This allows upstream caches to return the correct data even when
compression is not in use. It is not sent if the content would never
be compressed. I.E. size < 100 bytes, dynamic compression
disabled, file would not benefit from compression (img/jpeg, img/png).
Fix setVary to add header to vary list only if it's not already there.
Found by redbot.org testing.
References:
https://www.stackpath.com/blog/accept-encoding-vary-important/
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 02 Jun 2024 18:22:53 -0400 |
| parents | 07ce4e4110f5 |
| children |
