Commit Graph
5 Commits
Author SHA1 Message Date
German Khokhlov caad795fa2 refactor(server): drop the null and String paths from gzipBody 2026-11-09 18:15:13 +04:00
German Khokhlov 09bf01630b docs(server): tighten compression comments and docs 2026-11-09 18:14:30 +04:00
daikaginza 85ce864bc4 Merge remote-tracking branch 'upstream/main' into feat/opensky-compress-cached-body
main renamed the flights proxy mount from /api/opensky to /api/flights. Git
took the new mount cleanly but left this branch's own tests and notes on the
old path, and the compression test then failed. They now use /api/flights.
2026-10-16 09:24:33 +07:00
daikaginza e7dd71e9bc fix(server): read the whole q value, not a numeric prefix
Number.parseFloat accepts any valid numeric prefix, so `gzip;q=1oops` read as 1
and the out-of-range `gzip;q=2` was accepted — both contradicting the comment
two lines above, which promises that a quality this cannot read confidently
fails closed. Matching the qvalue grammar of RFC 9110 section 12.4.2 makes the
code do what it already claimed to do.

Thanks to kvnloo for catching it on review.
2026-09-29 11:13:36 +07:00
daikaginza daed0be99a feat(server): compress the cached OpenSky snapshot for clients that accept gzip
The ~860 KB snapshot is held for an adaptive 9-300 s TTL and was served as
identity bytes to every request; no response in server/ set Content-Encoding or
Vary. Gzip it once per refresh beside the cached body, off the event loop, and
return the body and the header that names it together so the two can never
disagree. Live against an anonymous snapshot: 874,002 B to 258,012 B, 3.39x,
decompressing byte-identical to the uncompressed response.
2026-09-29 10:57:45 +07:00