Fix two bugs
- return 2 values instead of pair from READ-RFC822-FIELD - return alist in correct order from READ-RFC822-HEADERS and READ-RFC822-HEADERS-WITH-LINE-BREAKS
This commit is contained in:
parent
8b2217907e
commit
3611d6486d
|
@ -64,9 +64,10 @@
|
|||
(lambda (s) (string->symbol (string-map char-upcase s)))))
|
||||
|
||||
(define (read-rfc822-field . args)
|
||||
(let ((pair (apply read-rfc822-field-with-line-breaks args)))
|
||||
(cons (car pair)
|
||||
(string-concatenate (cdr pair)))))
|
||||
(receive (field body)
|
||||
(apply read-rfc822-field-with-line-breaks args)
|
||||
(values field
|
||||
(string-concatenate body))))
|
||||
|
||||
(define (read-rfc822-field-with-line-breaks . args)
|
||||
(let-optionals args ((port (current-input-port))
|
||||
|
@ -100,7 +101,7 @@
|
|||
(read-rfc822-field port read-line)
|
||||
(if field
|
||||
(lp (cons (cons field val) alist))
|
||||
alist))))))
|
||||
(reverse alist)))))))
|
||||
|
||||
(define read-rfc822-headers
|
||||
(make-read-rfc822-headers read-rfc822-field))
|
||||
|
|
Loading…
Reference in New Issue