📌 Description
Per the README, responses are gzip-compressed when the client sends Accept-Encoding: gzip and the body is large enough to benefit. src/compression.test.ts likely covers the gzip-accepted case, but not what happens when a client sends an encoding the server doesn't support (e.g. Accept-Encoding: br only, no gzip/identity) — it should gracefully fall back to an uncompressed response, not error.
🧩 Requirements and context
- Add a test sending
Accept-Encoding: br (and no gzip) against a large response body, asserting a successful, uncompressed (identity) response rather than an error.
- Add a test for
Accept-Encoding: gzip;q=0 (explicitly disallowed) similarly falling back cleanly.
- No production code changes expected unless the tests reveal a real gap in
src/app.ts's compression wiring.
🛠️ Suggested execution
- Extend
src/compression.test.ts with the unsupported/disallowed-encoding cases.
- If a gap surfaces, adjust the compression middleware configuration in
src/app.ts.
✅ Acceptance criteria
🔒 Security notes
No new attack surface; ensures compression negotiation can't produce request failures.
📋 Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
📌 Description
Per the README, responses are gzip-compressed when the client sends
Accept-Encoding: gzipand the body is large enough to benefit.src/compression.test.tslikely covers the gzip-accepted case, but not what happens when a client sends an encoding the server doesn't support (e.g.Accept-Encoding: bronly, nogzip/identity) — it should gracefully fall back to an uncompressed response, not error.🧩 Requirements and context
Accept-Encoding: br(and nogzip) against a large response body, asserting a successful, uncompressed (identity) response rather than an error.Accept-Encoding: gzip;q=0(explicitly disallowed) similarly falling back cleanly.src/app.ts's compression wiring.🛠️ Suggested execution
src/compression.test.tswith the unsupported/disallowed-encoding cases.src/app.ts.✅ Acceptance criteria
Accept-Encodingstill receive a valid, uncompressed response.q=0-disallowed gzip falls back cleanly.🔒 Security notes
No new attack surface; ensures compression negotiation can't produce request failures.
📋 Guidelines