diff options
author | Arun Isaac | 2019-12-04 16:39:43 +0530 |
---|---|---|
committer | Arun Isaac | 2019-12-04 16:48:08 +0530 |
commit | 641168f09dd117f053726593811bd0e35f6cc33e (patch) | |
tree | 0ce292eace092d58518903930280c224da338987 /tests/email.scm | |
parent | 121073cb725aef9baecaac0cfb6cf3f5a287c4e7 (diff) | |
download | guile-email-641168f09dd117f053726593811bd0e35f6cc33e.tar.gz guile-email-641168f09dd117f053726593811bd0e35f6cc33e.tar.lz guile-email-641168f09dd117f053726593811bd0e35f6cc33e.zip |
email: Handle blank Subject headers.
* email/email.scm (post-process-fields): Treat blank Subject headers
as having the null string as value.
* tests/email.scm ("blank Subject header must be treated as having the
null string as value"): New test.
Reported-by: Ricardo Wurmus <rekado@elephly.net>
Diffstat (limited to 'tests/email.scm')
-rw-r--r-- | tests/email.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm index 03c3b70..477ddc9 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -376,6 +376,15 @@ copyright =A9") (charset . "utf-8")) (content-transfer-encoding . 7bit))) +(test-alist= "blank Subject header must be treated as having the null string as value" + (parse-email-headers + "Subject: +") + '((subject . "") + (content-type (type . text) + (subtype . plain) + (charset . "utf-8")) + (content-transfer-encoding . 7bit))) (test-equal "parse name-addr email address" (parse-email-address "Foo <foo@example.org>") '((name . "Foo") (address . "foo@example.org"))) |