From b800536e7473d6937918088ae4d5ce06195a7f8a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 01:41:40 +0000 Subject: [PATCH] Assert POST error content-length in smoke test Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index 9404f18f35..fc137117ed 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -245,6 +245,14 @@ async function main() { )}.`, ); } + const postContentLength = Number(postPage.headers.get("content-length") ?? "0"); + if (!Number.isFinite(postContentLength) || postContentLength <= 0) { + throw new Error( + `Smoke test failed: expected positive content-length on POST response, got ${String( + postPage.headers.get("content-length"), + )}.`, + ); + } if ((postPage.headers.get("cache-control") ?? "").toLowerCase() !== "no-store") { throw new Error("Smoke test failed: expected cache-control=no-store on POST response."); }