Commit d0e5f21
committed
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/1 parent 2e793cb commit d0e5f21
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2355 | 2355 | | |
2356 | 2356 | | |
2357 | 2357 | | |
2358 | | - | |
| 2358 | + | |
| 2359 | + | |
2359 | 2360 | | |
2360 | 2361 | | |
2361 | 2362 | | |
| |||
2373 | 2374 | | |
2374 | 2375 | | |
2375 | 2376 | | |
| 2377 | + | |
2376 | 2378 | | |
2377 | 2379 | | |
2378 | 2380 | | |
| |||
2381 | 2383 | | |
2382 | 2384 | | |
2383 | 2385 | | |
| 2386 | + | |
| 2387 | + | |
2384 | 2388 | | |
2385 | 2389 | | |
2386 | 2390 | | |
| |||
2419 | 2423 | | |
2420 | 2424 | | |
2421 | 2425 | | |
2422 | | - | |
2423 | 2426 | | |
2424 | 2427 | | |
2425 | 2428 | | |
| |||
0 commit comments