diff options
author | Arun Isaac | 2021-10-24 02:46:01 +0530 |
---|---|---|
committer | Arun Isaac | 2021-10-24 02:52:06 +0530 |
commit | 86f0af337b3d4c8afc075c09a1aae4b1694d9ebd (patch) | |
tree | 1053281f2930d857c63ec4f24e18bb8f5dca8cdb /tests | |
parent | 4ff159505d35202861d09859859c98997bf55bcd (diff) | |
download | guile-email-86f0af337b3d4c8afc075c09a1aae4b1694d9ebd.tar.gz guile-email-86f0af337b3d4c8afc075c09a1aae4b1694d9ebd.tar.lz guile-email-86f0af337b3d4c8afc075c09a1aae4b1694d9ebd.zip |
email: Handle unrecognized Content-Transfer-Encoding headers.
* email/email.scm (handle-invalid-headers): New function.
(parse-email-headers): Handle invalid headers.
* tests/email.scm ("Assume application/octet-stream Content-Type if
Content-Transfer-Encoding is unrecognized"): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/email.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/email.scm b/tests/email.scm index 52f38b6..50625f1 100644 --- a/tests/email.scm +++ b/tests/email.scm @@ -523,6 +523,16 @@ Received: from zzz ([1.2.3.5]) by ooo.ooo.com with Maccrosoft SMTPSVC(5.5.1877. (charset . "utf-8")) (content-transfer-encoding . 7bit))) +;; See ยง6.4 in RFC2045. +(test-alist= "Assume application/octet-stream Content-Type if Content-Transfer-Encoding is unrecognized" + (parse-email-headers + "Content-Transfer-Encoding: some-unrecognized-encoding +Content-Type: text/plain; charset=utf-8 +") + `((content-type (type . application) + (subtype . octet-stream)) + (content-transfer-encoding . binary))) + ;;; ;;; Email addresses |