Skip to content

Commit c71a087

Browse files
committed
docs(changeset): put back the 23914 hono note byte for byte and the 24042 sentence that supersedes its bullet
The #17712 guard refuses an edit of a pending changeset this PR did not add. Claude-Session: https://claude.ai/code/session_018t6a5rvqPRvEDMCVVW9kYT Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6328246 commit c71a087

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎.changeset/23914-hono-body-refusal.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ What changes for an integrator, on a host that serves `createHonoApp`:
2222
**Unchanged.**
2323

2424
- An empty or whitespace-only JSON body is dispatched as `{}` (an empty query), as before.
25+
- A body that does not declare JSON is read as before: parsed when it is JSON, `{}` when it is not.
2526
- The request handed on beside the body still arrives unread, in every case. A domain that forwards it and reads its own bytes answers exactly as before, a malformed JSON body included: `/webhooks/redeliver` and the inbound automation hooks give their own refusal after their own sign-in or signature check, and the `/approvals/act` form `POST` reads its form.
2627
- The catch-all dispatches `GET`, `HEAD` and `DELETE` with no body, and the `/auth/*` fallback hands `GET` and `HEAD` `{}`, as before.

‎.changeset/24042-hono-undeclared-body-refusal.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ What changes for an integrator, on a host that serves `createHonoApp`, for a `PO
1818
- Any other body that declares neither JSON nor a form (`text/plain`, `application/octet-stream`, a `+json` suffix type such as `application/merge-patch+json`, or no `Content-Type` at all), when the request declares a body (`Content-Length` other than `0`, or `Transfer-Encoding`): FROM `{}`, TO the same refusal ("sent with no Content-Type" when there is none).
1919
- A `multipart/form-data` or `application/x-www-form-urlencoded` body: FROM `{}`, TO its parsed fields, as `plugin-hono-server` hands them (Hono's `parseBody`: the last value of a repeated name). A form that does not parse: TO the refusal "The request body could not be parsed as form data (it was sent as multipart/form-data). It was refused rather than read as an empty body."
2020

21-
The domain acts on nothing past its read of the body, and the dispatcher's own gates still answer first. Each answer is the status and body `@objectstack/plugin-hono-server` gives the same request.
21+
The domain acts on nothing past its read of the body, and the dispatcher's own gates still answer first. Each answer is the status and body `@objectstack/plugin-hono-server` gives the same request. This replaces the earlier `createHonoApp` entry's statement that a body that does not declare JSON is read as before.
2222

2323
**Remedy, in one line.** Send a JSON body with `Content-Type: application/json`, or send no body.
2424

0 commit comments

Comments
 (0)