1 check that cgi-exec is producing expected results:
3 $ [ -n "$BUILD_BIN_DIR" ] && export PATH="$BUILD_BIN_DIR:$PATH"
4 $ ln -sf $BUILD_BIN_DIR/cgi-io-san $BUILD_BIN_DIR/cgi-exec
6 $ for file in $(LC_ALL=C find "$TESTDIR/test-cases" -type f | sort); do
7 > export CONTENT_TYPE="application/x-www-form-urlencoded"; \
8 > export CONTENT_LENGTH="$(wc -c < $file)"; \
9 > printf "\n[-] testing: $(basename $file)\n"; \
13 [-] testing: cgi-exec-01.txt
14 Status: 400 Invalid command parameter\r (esc)
15 Content-Type: text/plain\r (esc)
17 Invalid command parameter
19 [-] testing: cgi-exec-02.txt
20 Status: 200 OK\r (esc)
21 Content-Type: application/octet-stream\r (esc)
25 [-] testing: cgi-exec-03.txt
26 Status: 200 OK\r (esc)
27 Content-Type: 0\r (esc)
28 Content-Disposition: attachment; filename="output.txt"\r (esc)