Assert POST error content-length in smoke test

Co-authored-by: Theo Browne <[email protected]>
This commit is contained in:
Cursor AgentandTheo Browne committed 2026-02-10 01:41:40 +00:00
1 parent ebf290e8f5
commit b800536e74
1 file changed
+8
+8
View File
@@ -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.");
}