diff options
author | Arun Isaac | 2020-12-05 20:05:56 +0530 |
---|---|---|
committer | Arun Isaac | 2020-12-05 20:05:56 +0530 |
commit | 19d2b58465aa09c6ff0766b0accc2a94cc425415 (patch) | |
tree | 4be95de41afe0042478999bc06abf864f3498287 | |
parent | 1f042830391494f4ad48036359d2788bf0527dba (diff) | |
download | guile-email-19d2b58465aa09c6ff0766b0accc2a94cc425415.tar.gz guile-email-19d2b58465aa09c6ff0766b0accc2a94cc425415.tar.lz guile-email-19d2b58465aa09c6ff0766b0accc2a94cc425415.zip |
email: Support obsolete Received header.
* email/email.scm (received): Include obsolete pattern.
(parse-mime-entity): Post process obsolete received forms.
-rw-r--r-- | email/email.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/email/email.scm b/email/email.scm index 398ddb3..e624a98 100644 --- a/email/email.scm +++ b/email/email.scm @@ -545,7 +545,8 @@ (or angle-addr addr-spec domain word)) (define-field-pattern received "Received" - (and (* received-token) (ignore ";") date-time)) + (and (* received-token) (ignore ";") date-time) + (* received-token)) (define-peg-pattern path body (or angle-addr (and (? cfws) (ignore "<") (? cfws) (ignore ">") (? cfws)))) @@ -1005,7 +1006,9 @@ list of header keys and values." (match-pattern fields headers)) `((received . ,(match-lambda* (`(received ,tokens ,timestamp) - (list 'received (string-join tokens) timestamp)))) + (list 'received (string-join tokens) timestamp)) + (('received tokens ...) + (list 'received (string-join tokens))))) (received-token . ,(match-lambda* (`(received-token ,token) token))) (date-time . ,(lambda node |