]> birchwood-abbey.net Git - mit-scheme.git/commitdiff
Fix parsing error when reading RFC 2822 headers.
authorChris Hanson <org/chris-hanson/cph>
Thu, 1 Sep 2022 06:16:45 +0000 (23:16 -0700)
committerChris Hanson <org/chris-hanson/cph>
Thu, 1 Sep 2022 06:16:45 +0000 (23:16 -0700)
src/runtime/rfc2822-headers.scm

index ad55daf9f704e8938fcee47d4bf6f8d74b67b633..8b75cd3b62b4331a70e1c3f67a4fc9dfb1b76b47 100644 (file)
@@ -213,9 +213,12 @@ USA.
   (let ((byte (peek-u8 port)))
     (cond ((eof-object? byte)
           byte)
-         ((and (fix:<= 32 byte) (fix:<= byte 126))
+         ((or (fix:= 13 byte)
+              (fix:= 10 byte)
+              (and (fix:<= 32 byte) (fix:<= byte 126)))
           (integer->char byte))
-         (else (parse-error port "Illegal character:" 'peek-ascii-char)))))
+         (else
+          (parse-error port "Illegal character:" byte 'peek-ascii-char)))))
 
 (define (skip-wsp-left string start end)
   (let loop ((i start))