tiny_httpd/tests/download_chunked.sh
craff f08406c1ae Revert "close fd correctly"
This reverts commit 912c7b1fd7.
2021-12-19 00:53:54 -10:00

23 lines
421 B
Bash
Executable file

#!/usr/bin/env sh
SERVER=$1
PORT=8084
"$SERVER" . -p $PORT &
PID=$!
sleep 0.1
echo download1 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data2 \
-H 'Tranfer-encoding: chunked'
echo download2 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data2 \
-H 'Tranfer-encoding: chunked'
echo download3 1>&2
curl -N "http://localhost:${PORT}/foo_50" -o data2 \
-H 'Tranfer-encoding: chunked'
kill $PID
wc data2