summaryrefslogtreecommitdiff
path: root/email
diff options
context:
space:
mode:
authorArun Isaac2019-12-04 16:39:43 +0530
committerArun Isaac2019-12-04 16:48:08 +0530
commit641168f09dd117f053726593811bd0e35f6cc33e (patch)
tree0ce292eace092d58518903930280c224da338987 /email
parent121073cb725aef9baecaac0cfb6cf3f5a287c4e7 (diff)
downloadguile-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 'email')
-rw-r--r--email/email.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/email/email.scm b/email/email.scm
index fdd8031..9478477 100644
--- a/email/email.scm
+++ b/email/email.scm
@@ -723,6 +723,9 @@ values. The returned headers is a string and body is a bytevector."
(cons field value))
((field . values)
(cons field values))
+ ;; If the Subject header is blank, treat it as having the
+ ;; null string as value.
+ ('subject '(subject . ""))
(_ #f))
fields))