commit - 28ec61780962b6aa7b50845e3738399a92dc9e0c
commit + 7b31a6386d6f80a3dd79af7d56bbf48b6eb7a264
blob - a7b693cab502ae51c50c54ac4e50700a42cfd88b
blob + 195cb0d91ba2f7d1e27f9ebb15a030869aeaf490
--- regress/Makefile
+++ regress/Makefile
./sha testdata/bigfile testdata/bigfile.sha
printf "# hello world\n" > testdata/index.gmi
./sha testdata/index.gmi testdata/index.gmi.sha
- cp hello slow err invalid testdata/
+ cp hello slow err invalid serve-bigfile testdata/
mkdir testdata/dir
cp testdata/index.gmi testdata/dir/foo.gmi
blob - 6e62029b119ed834817fb59d9e2decd7f6bbf754
blob + 6456746896c5007c4069412fc1389420f767482b
--- regress/runtime
+++ regress/runtime
eq "$(raw /invalid | wc -c | xargs)" 2048 "Unexpected body for /invalid"
echo OK GET /invalid with cgi
+# try a big file
+eq "$(head /serve-bigfile)" "20 application/octet-stream" "Unexpected head for /serve-bigfile"
+get /bigfile > bigfile
+./sha bigfile bigfile.sha
+eq "$(cat bigfile.sha)" "$(cat testdata/bigfile.sha)" "Unexpected sha for /serve-bigfile"
+echo OK GET /serve-bigfile with cgi
+
check "should be running"
quit
blob - /dev/null
blob + 56fb48834be8cedb254ee2cfa5f430f79f653a1d (mode 644)
--- /dev/null
+++ regress/serve-bigfile
+#!/bin/sh
+
+printf "20 application/octet-stream\r\n"
+
+exec cat bigfile