From c31f0c8de2c53fccfb218ba02b3f66068371dff2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 10 Feb 2026 02:32:49 +0000 Subject: [PATCH] Assert HEAD missing-asset content-length in smoke Co-authored-by: Theo Browne --- apps/t3/scripts/smoke-test.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/t3/scripts/smoke-test.mjs b/apps/t3/scripts/smoke-test.mjs index b21be50ea5..6e3e0f7630 100644 --- a/apps/t3/scripts/smoke-test.mjs +++ b/apps/t3/scripts/smoke-test.mjs @@ -314,6 +314,16 @@ async function main() { "Smoke test failed: expected cache-control=no-store on HEAD missing asset response.", ); } + const headMissingAssetContentLength = Number( + headMissingAsset.headers.get("content-length") ?? "0", + ); + if (!Number.isFinite(headMissingAssetContentLength) || headMissingAssetContentLength <= 0) { + throw new Error( + `Smoke test failed: expected positive content-length on HEAD missing asset response, got ${String( + headMissingAsset.headers.get("content-length"), + )}.`, + ); + } if ((headMissingAsset.headers.get("x-content-type-options") ?? "").toLowerCase() !== "nosniff") { throw new Error("Smoke test failed: expected nosniff on HEAD missing asset response."); }