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

Merged opened this

Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.

Merged

smith/arm:smith/600-so101-server-hang-up-after-answering-413 → main 3 commits fork 1 thread · 1 unresolved

  • Merged. smith/600-so101-server-hang-up-after-answering-413 was merged into main as f5a7213.

Review

Sign in to review this change.
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
118118 for (const device of ["light", "pump"]) {
119119 const { answeredMs, reply } = await flood(port, `/grow/${device}`, 40); // 4 MB offered, 1 MB allowed
120120 expect(reply).toContain("413");
121 expect(reply.toLowerCase()).toContain("connection: close"); // hung up after the answer

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.

121122 expect(answeredMs).toBeGreaterThanOrEqual(0);
122123 expect(answeredMs).toBeLessThan(1000); // answered at the cap, not after the whole body
123124 const grow = (await (await fetch(`${base}/grow`)).json()) as Record<string, { configured: boolean }>;

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs