← back to AsSeenInMovies
smoke: assert Vary: Accept-Encoding (cache-safety regression guard)
211c824e41b0038ade7a074a3737e7c20feea496 · 2026-05-13 10:28:40 -0700 · SteveStudio2
Files touched
Diff
commit 211c824e41b0038ade7a074a3737e7c20feea496
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 10:28:40 2026 -0700
smoke: assert Vary: Accept-Encoding (cache-safety regression guard)
---
test/smoke.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/smoke.js b/test/smoke.js
index 7c66879..d690611 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -173,9 +173,11 @@ function check(name, cond, hint = '') {
check('favicon: 200', r.status === 200);
check('favicon: image/svg', /image\/svg/.test(r.headers['content-type'] || ''));
- // 14b. gzip negotiated
+ // 14b. gzip negotiated + Vary: Accept-Encoding (so caches/CDNs don't
+ // serve the gzipped body to clients that didn't ask for gzip)
r = await fetch('/movies', { headers: { 'Accept-Encoding': 'gzip' } });
check('gzip /movies', (r.headers['content-encoding'] || '') === 'gzip');
+ check('vary Accept-Encoding',(r.headers['vary'] || '').toLowerCase().includes('accept-encoding'));
// 15. /about + /privacy + /terms
r = await fetch('/about');
← c79cbbc smoke: assert /api/version git !== 'unknown' (catches missin
·
back to AsSeenInMovies
·
smoke: assert /people sort + density (grid standard) e68674f →