prerender-v0.97.2 — @harperfast/prerender
@harperfast/prerender 0.97.2
An uncompressed origin body is gzipped before it is stored, in the raw cache and the negative cache (#229).
- A body the origin sent with no
content-encoding(oridentity) is gzipped at level 6 on the detached store path and stored undercontent-encoding: gzip. A body the origin already encoded is stored exactly as before. - The serve path is unchanged: it re-encodes from the stored header, so gzip clients get the stored bytes and others a decode.
maxBytesstill counts bytes as received. It bounds the capture's memory, and for these bodies that memory is uncompressed. Sizerender.negative.maxBytesfor an uncompressed error page: its default, 1 MB, fits the pages that prompted this.
Why: one production origin gzips its pages but sends every 404 uncompressed, whatever Accept-Encoding asks for (16 of 16 sampled, 79-699 KB). Stored as sent, those bodies took 7-13x the storage, and answering from storage would re-encode each one for the crawler. Measured: gzip takes 1.7-2.4 ms of CPU per 348-699 KB body and produces 47-54 KB, once per stored body.
No schema change, no config change. Rows stored before this release keep serving as they are.
1,823/1,823 plugin tests. Console unchanged (0.22.0).