From 784ce4aba84503f9a798dd0531b50275f25898c2 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Tue, 18 Aug 2026 20:43:07 -0700 Subject: Always send the Status header --- tests/t0107-snapshot.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/t0107-snapshot.sh b/tests/t0107-snapshot.sh index 0762ab2..6f5f588 100755 --- a/tests/t0107-snapshot.sh +++ b/tests/t0107-snapshot.sh @@ -16,9 +16,12 @@ test_expect_success 'get foo/snapshot/master.tar.gz' ' test_expect_success 'check html headers' ' head -n 1 tmp | - grep "Content-Type: application/x-gzip" && + grep "Status: 200 OK" && head -n 2 tmp | + grep "Content-Type: application/x-gzip" && + + head -n 3 tmp | grep "Content-Disposition: inline; filename=.master.tar.gz." ' @@ -57,9 +60,12 @@ test_expect_success LZIP 'get foo/snapshot/master.tar.lz' ' test_expect_success LZIP 'check html headers' ' head -n 1 tmp | - grep "Content-Type: application/x-lzip" && + grep "Status: 200 OK" && head -n 2 tmp | + grep "Content-Type: application/x-lzip" && + + head -n 3 tmp | grep "Content-Disposition: inline; filename=.master.tar.lz." ' @@ -98,9 +104,12 @@ test_expect_success XZ 'get foo/snapshot/master.tar.xz' ' test_expect_success XZ 'check html headers' ' head -n 1 tmp | - grep "Content-Type: application/x-xz" && + grep "Status: 200 OK" && head -n 2 tmp | + grep "Content-Type: application/x-xz" && + + head -n 3 tmp | grep "Content-Disposition: inline; filename=.master.tar.xz." ' @@ -139,9 +148,12 @@ test_expect_success ZSTD 'get foo/snapshot/master.tar.zst' ' test_expect_success ZSTD 'check html headers' ' head -n 1 tmp | - grep "Content-Type: application/x-zstd" && + grep "Status: 200 OK" && head -n 2 tmp | + grep "Content-Type: application/x-zstd" && + + head -n 3 tmp | grep "Content-Disposition: inline; filename=.master.tar.zst." ' @@ -174,9 +186,12 @@ test_expect_success 'get foo/snapshot/master.zip' ' test_expect_success 'check HTML headers (zip)' ' head -n 1 tmp | - grep "Content-Type: application/x-zip" && + grep "Status: 200 OK" && head -n 2 tmp | + grep "Content-Type: application/x-zip" && + + head -n 3 tmp | grep "Content-Disposition: inline; filename=.master.zip." ' -- cgit v2.8.0