diff options
author | Arun Isaac <arunisaac@systemreboot.net> | 2018-09-25 12:43:33 +0530 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-11-09 20:08:51 +0100 |
commit | f69fc96b05cc6d93ea8c53ecf8682315b5a1b5a1 (patch) | |
tree | 5258b048faa4c781fba8bb5f55c97ada80da2f66 | |
parent | f7e5156602a5c186e18153553de73a7e5ef87078 (diff) |
debbugs: Work around debbugs bug by trimming headers.
* debbugs/email.scm (email): The first two lines of debbugs returned
headers are invalid. Discard them.
-rw-r--r-- | debbugs/email.scm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/debbugs/email.scm b/debbugs/email.scm index 739a9ff..b67d7be 100644 --- a/debbugs/email.scm +++ b/debbugs/email.scm @@ -49,7 +49,14 @@ (lambda () (rfc822-header->list (current-input-port))))) (define* (email #:key header body msg-num (attachments '())) - (make-email (parse-headers header) body attachments)) + (define (drop-lines str k) + (if (zero? k) + str + (drop-lines (substring str (1+ (string-index str #\newline))) + (1- k)))) + + (make-email (parse-headers (drop-lines header 2)) + body attachments)) (define (soap-email->email email-item) "Convert an SXML expression representing an email item from a SOAP |