diff options
| author | Sam Varshavchik | 2015-07-19 06:36:20 -0400 | 
|---|---|---|
| committer | Sam Varshavchik | 2015-07-19 06:36:20 -0400 | 
| commit | 796dc9a0b94b67f1303e1db61311f7b458e5e36a (patch) | |
| tree | 517c8fc556745197d70a818e71512e45e90095dd /maildrop/testsuite2 | |
| parent | 19309085193effe5d231fa3c99e8f9c33fdc2b4f (diff) | |
| download | courier-libs-796dc9a0b94b67f1303e1db61311f7b458e5e36a.tar.bz2 | |
Fix parsing of a message without a body.
Until the empty line separating headers from body is read, point
startofbody at the end of the parsed text, so if the empty line
is never read, the entire contents of the message is parsed as
headers.
Diffstat (limited to 'maildrop/testsuite2')
| -rw-r--r-- | maildrop/testsuite2 | 20 | 
1 files changed, 20 insertions, 0 deletions
| diff --git a/maildrop/testsuite2 b/maildrop/testsuite2 index e63768b..8d08e1b 100644 --- a/maildrop/testsuite2 +++ b/maildrop/testsuite2 @@ -240,4 +240,24 @@ do  done  runtest " with xfilter" + +cat >testsuite.msg <<EOF +X-Spam-Flag: yes +EOF +cat >testsuite1.filter <<EOF +EXITCODE=0 +if (/^X-Spam-Flag/) +{ +    EXITCODE=1 +} +EOF + +chmod 600 testsuite1.filter + +if ./maildrop ./testsuite1.filter <testsuite.msg +then +    echo "bodyless message test failed" +    exit 1 +fi +  rm -f testsuite?.filter testsuite.msg | 
