From f69fc96b05cc6d93ea8c53ecf8682315b5a1b5a1 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 25 Sep 2018 12:43:33 +0530 Subject: debbugs: Work around debbugs bug by trimming headers. * debbugs/email.scm (email): The first two lines of debbugs returned headers are invalid. Discard them. --- debbugs/email.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3