oficina / docs Public

Docs: a gzipped save a server refuses is sent again uncompressed

A server that does not gunzip (this deploy rolled back with a tab still
on the new bundle, or a hop that strips Content-Encoding) reads the
compressed bytes as the update and answers 400, and the queue drops a
batch a 4xx answers: every save of 1KB or more would be lost (Claude
Fable on #94, round 2). createPoster sends such a save once more as it
is, answering 400, 415 or 422, and stops gzipping for the page. A new
browser case strips Content-Encoding on the way in: before, the paste
was dropped and the line said failed, in both engines.

And quiet retries, the browser refusing while the server answers the
probe, back off from 500ms to 4s instead of costing a save and a probe
every 250ms.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 0e85d958e619f5b74adcc7bc8689a646c1062a05 parent 2c518dd
7 files changed, +208 −29
  • AGENTS.md +8 −3
  • fixtures/editor-entry.js +7 −4
  • fixtures/engines/saving.mjs +21 −0
  • fixtures/save-queue.mjs +52 −4
  • fixtures/save-queue.test.mjs +77 −3
  • internal/docs/saving_browser_test.go +30 −2
  • internal/docs/static/{editor.df7c26273261e92c.js => editor.b1deb16d14dc385c.js} +13 −13
AGENTS.md

Loading diff…

fixtures/editor-entry.js

Loading diff…

fixtures/engines/saving.mjs

Loading diff…

fixtures/save-queue.mjs

Loading diff…

fixtures/save-queue.test.mjs

Loading diff…

internal/docs/saving_browser_test.go

Loading diff…

internal/docs/static/{editor.df7c26273261e92c.js => editor.b1deb16d14dc385c.js}

Loading diff…