v0.12.2 — Faithful recording of compressed APIs
A bug found live while recording a real public API from a browser: compressed upstream responses were baked into generated stubs as raw gzip bytes — unreadable in the dashboard, unreplayable ever after.
Fix
- Recording now decodes compressed upstream bodies (gzip, deflate/zlib, brotli) into the generated stub and drops the
Content-Encodingheader — the stub holds the payload a client actually sees - The live pass-through to the caller stays byte-identical (your browser still receives the compressed wire response while recording)
- An encoding that cannot be decoded falls back to the raw capture — never worse than before
Oracle-verified
Pinned with a new differential test (Recording_AGzippedUpstreamResponse_GeneratesAReplayableStub): record → stop → reload → replay against an always-gzip upstream on both Mockifyr and the real reference oracle. Red before the fix (oracle replayed the upstream text; Mockifyr replayed invalid gzip), green after — and re-verified end-to-end against jsonplaceholder, the exact scenario that surfaced it.
Validation: 193 oracle-backed differential tests (one new), 285 unit tests, live re-test of the original browser-driven recording.
🤖 Generated with Claude Code