Flow · Diagram Design
HTTP: six checks in order, and the status each one answers with
The checks the HTTP transport makes on a POST before anything runs
Seven boxes in a row, left to right: path, host and origin, token, size, JSON, headers and run. Under each of the first six is the status it answers with: 404, 403, 401, 413, 400 with a parse error, and 400 or 404 with a JSON-RPC error for a header that does not match. If all six pass, the request runs.
THE FIRST CHECK THAT FAILS STOPS THE REQUEST · NOTHING HAS RUN
pass
pass
pass
pass
pass
pass
Path
Host and
Origin
Token
Size
JSON
Headers
Run
404
empty body
nothing more
403
empty body
stops DNS
rebinding
401
empty body
body unread
413
empty body
body unread
400
-32700
parse error
400 or 404
JSON-RPC
-32020
-32022
-32600
-32601
the request goes on
a failed check: its reply is shown under it
GET and DELETE get 405 at once, before any check
-32020 header mismatch · -32022 unsupported version
-32600 old version · -32601 unknown method (404)
the token is checked before the body is read; a client that stalls is dropped after 15 s