Accept: malleable studio

One URL. Any Accept.

Open Real-World App: PageMorph (/app) ↗

Every request below hits the same canonical URL. Only the HTTP Accept header changes. An edge Worker parses the page once and compiles it into a manga page, a slide deck, a podcast script, flashcards, a Risograph zine, or a spec tree. None of these media types are registered with IANA.

Edit freely: parameters (; reading=ltr; panels=4), q-values (deck/slides;q=0.4, comic/manga), or invent a type (theater/stage-play).

Edge transform vs live AI rewrite

The stage above is a deterministic edge compile: it only rearranges sentences the page already contains. Optionally, rewrite its text fields with a model that runs in or near your browser. Nothing is sent to this Worker.

Model provider

Idle. The current stage shows the edge-deterministic output.

HTTP wire inspector

Request

Waiting for the first request.

curl

Response headers

Body

IANA & RFC 9110 reality matrix

RFC 9110 only requires type/subtype to be valid tokens, so every row parses. Registration is a separate question: IANA lists eleven top-level types, and comic, deck, study, visual, code, and theater are not among them.

Media type RFC 9110 syntax IANA top-level IANA subtype Body on the wire Cache keys Strict mode
Strict 406 falsification check

Hypothesis: a server can accept any well-formed type/subtype without breaking HTTP semantics. Falsifier: in strict mode the same server must refuse unknown types with 406 Not Acceptable and list alternates in Link, while built-in faux types still return 200.

AcceptQueryExpectedObservedX-Media-Type-ModeResult
Not run yet.
How this is set up
  1. Canonical source. /pages/:slug serves three hand-structured pages. /transform?url=https://… fetches any public HTTPS page (HTTPS only, private/loopback/metadata addresses blocked on every redirect hop, 512 KiB cap, 5 s timeout) and extracts headings, paragraphs, quotes, lists, and code with Cloudflare's streaming HTMLRewriter.
  2. Negotiation. src/negotiate.ts parses the Accept header per RFC 9110: quoted parameters, q-values, specificity, and token grammar. Exact faux types win, type/* maps to the faux type with that prefix, and any other valid type/subtype becomes custom-synthesized unless ?strict=1 is set.
  3. Compilation. src/transforms.ts compiles the document into panels, slides, turns, cards, zine pages, or a graph. It reads parameters such as reading, panels, tone, hosts, and slides, and reports unused ones in X-Accept-Params-Ignored.
  4. One drawing routine, two outputs. public/comic-art.js builds a DOM-free scene graph per panel. The browser turns it into nodes with createElementNS; the Worker serializes the same graph for ?export=svg.
  5. Honest headers. Each response carries Vary: Accept, Content-Location, Link alternates, X-IANA-Registered, X-Syntax-Valid-RFC9110, X-Cache-Risk, X-Source-Bytes, and X-Extraction-Parser.
  6. Optional live AI. The rewrite bar sends only the rendered text fields plus a source excerpt to the provider you pick. The edge output stays available through Revert.
curl -i https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation \
  -H 'Accept: comic/manga; reading=ltr; panels=6; tone=noir'

curl -o manga.svg 'https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation?export=svg' \
  -H 'Accept: comic/manga'

curl -i 'https://malleable-accept-studio.kinlan-test.workers.dev/pages/hyper-content-negotiation?strict=1' \
  -H 'Accept: theater/stage-play'   # 406 Not Acceptable

Glossary

Accept (RFC 9110 §12.5.1)
The request header listing media ranges the client prefers, with optional parameters and q-values from 0 to 1.
Content negotiation (RFC 9110 §12)
Selecting one representation of a resource based on request headers, while the URL stays the same.
IANA media types registry
The official list of registered top-level types and subtypes. comic/manga is not in it.
RFC 6838: media type registration
Rules for registering subtypes in the standards, vendor (vnd.), and personal trees, and for defining new top-level types.
406 Not Acceptable
The status a server may return when none of the requested media ranges can be served.
Vary
Tells caches which request headers change the response. Vary: Accept multiplies cache keys by the number of distinct Accept values.
HTMLRewriter
Cloudflare's streaming HTML parser, used here to extract structure from remote pages without a DOM.
Web Speech API
Browser speech synthesis used to play the audio/podcast script with alternating voices.