.
original commit: 0c9c38c23e0fd2d126ab62bcd5dc5e1b11772eef
This commit is contained in:
parent
45c5036b75
commit
46e338893f
|
@ -17,6 +17,9 @@
|
|||
(define re:continue (regexp "^[ \t\v]"))
|
||||
|
||||
(define (validate-header s)
|
||||
(let ([m (regexp-match #rx"[^\0-\277]" s)])
|
||||
(when m
|
||||
(error 'validate-header "non-Latin-1 character in string: ~a" (car m))))
|
||||
(let ([len (string-length s)])
|
||||
(let loop ([offset 0])
|
||||
(cond
|
||||
|
|
|
@ -214,8 +214,8 @@
|
|||
|
||||
(define mime-analyze
|
||||
(opt-lambda (input (part #f))
|
||||
(let* ((iport (if (string? input)
|
||||
(open-input-string input)
|
||||
(let* ((iport (if (bytes? input)
|
||||
(open-input-bytes input)
|
||||
input))
|
||||
(headers (get-headers iport))
|
||||
(msg (if part
|
||||
|
|
|
@ -40,7 +40,12 @@
|
|||
|
||||
(define (protect-line l)
|
||||
;; If begins with a dot, add one more
|
||||
(if (or (string=? "" l) (not (char=? #\. (string-ref l 0))))
|
||||
(if (or (equal? l #"")
|
||||
(equal? l "")
|
||||
(and (string? l)
|
||||
(not (char=? #\. (string-ref l 0))))
|
||||
(and (bytes? l)
|
||||
(not (= (char->integer #\.) (bytes-ref l 0)))))
|
||||
l
|
||||
(string-append "." l)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user