aboutsummaryrefslogtreecommitdiffstats
path: root/prototypes/workbench/cli.mjs
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-26 17:48:09 +0100
committereunhhu <[email protected]>2026-09-26 17:48:09 +0100
commitae48b510c9eec3e47ea551b4c4cad640d13310cd (patch)
tree65cd57054298d56a191dcde9c708cce2a8bd655e /prototypes/workbench/cli.mjs
parent62f4c51920129216ea779118c341379b5e9f4d7c (diff)
downloadpure-ae48b510c9eec3e47ea551b4c4cad640d13310cd.tar.gz
pure-ae48b510c9eec3e47ea551b4c4cad640d13310cd.zip
Take messages of number and text fields, several variable ones, as JSON
A message field is now a u32, a number (binary64), bytes or text, and variable fields may be several and anywhere: the payload's prefix holds the fixed fields and each variable field's length but the last one's, which takes the rest; a module whose one bytes field came last is laid out as before. On arrival a length past the payload, a text that is not UTF-8 or a number that is not finite fails the message. pure-serve fills an input's message from a JSON object body (Content-Type: application/json) on the connection thread before the request is ready, so the owner never parses and replies are still borrowed: the ingress is [u32 payload size][payload][the JSON as it came]. A missing, unknown, doubled or mistyped field, or text that is not JSON, answers 400 and the request never runs. Numbers may come in the query too.
Diffstat (limited to 'prototypes/workbench/cli.mjs')
0 files changed, 0 insertions, 0 deletions