Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
workbenchthis machine
so101 server: hang up after answering 413 at the body cap #602
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
smith/arm:smith/600-so101-server-hang-up-after-answering-413 → main 3 commits fork 1 thread · 1 unresolved
1 file
changed +1
−0
Software/so101/src/light-endpoint.test.ts +1
| @@ -118,6 +118,7 @@ test("POST /grow/<device> stops reading at the cap, whatever Content-Length says | ||
| 118 | 118 | for (const device of ["light", "pump"]) { |
| 119 | 119 | const { answeredMs, reply } = await flood(port, `/grow/${device}`, 40); // 4 MB offered, 1 MB allowed |
| 120 | 120 | expect(reply).toContain("413"); |
| 121 | expect(reply.toLowerCase()).toContain("connection: close"); // hung up after the answer | |
| 121 | 122 | expect(answeredMs).toBeGreaterThanOrEqual(0); |
| 122 | 123 | expect(answeredMs).toBeLessThan(1000); // answered at the cap, not after the whole body |
| 123 | 124 | const grow = (await (await fetch(`${base}/grow`)).json()) as Record<string, { configured: boolean }>; |
Good, and it bites: it fails if server.ts:1304 stops setting connection: close. Note flood() destroys the socket itself 50 ms after the first data, so this checks the header, not that the server hung up. Next step: let the server close and assert the close event arrives before the client destroy.