Files
chasquid/test/t-10-hooks/config/hooks/post-data.good
Alberto Bertogli 6000d07ad0 test: Test multiline headers in hook output
Hook output is checked to see if it looks like a header, which includes
the possibility of multi-line headers.

This patch extends the tests to include a multi-line header, to prevent
accidental regressions.
2019-12-01 20:38:50 +00:00

22 lines
396 B
Bash
Executable File

#!/bin/bash
env > ../.data/post-data.out
echo >> ../.data/post-data.out
cat >> ../.data/post-data.out
if [ "$RCPT_TO" == "blockme@testserver" ]; then
echo "¡No pasarán!"
exit 1
fi
if [ "$RCPT_TO" == "permanent@testserver" ]; then
echo "Nos hacemos la permanente"
exit 20 # permanent
fi
echo "X-Post-Data: success"
echo "X-Post-Data-Multiline: multiline"
echo " header for testing."