Apply MAX_MESSAGE_SIZE to the whole request body (closes #250) #253

Merged
clawbot merged 1 commits from issue-250-limit-whole-request-body into next 2026-11-03 09:20:43 +01:00
1 Commits
Author SHA1 Message Date
sneak 755e9ce6fa Apply MAX_MESSAGE_SIZE to the whole request body (closes #250)
check / check (push) Canceled after 0s
Creating a session, logging in and posting a message stopped reading
after the first JSON value, so the limit never saw the rest of the
body and trailing bytes were ignored. All three now read the whole
limited body and decode it with json.Unmarshal. A body over the limit,
or anything but whitespace after the value, gets 400 invalid request
body.

Model: opus-5-5
2026-11-03 07:47:35 +00:00