Add workaround for bug in Courier-IMAP.
authorChris Hanson <org/chris-hanson/cph>
Sun, 26 Nov 2000 06:02:28 +0000 (06:02 +0000)
committerChris Hanson <org/chris-hanson/cph>
Sun, 26 Nov 2000 06:02:28 +0000 (06:02 +0000)
v7/src/imail/imap-response.scm

index 5781e978697d6bab6779384c192561c7809ee399..40c2005722789e45bb4ef6991b4bad5e2875b5ef 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imap-response.scm,v 1.41 2000/07/03 03:37:27 cph Exp $
+;;; $Id: imap-response.scm,v 1.42 2000/11/26 06:02:28 cph Exp $
 ;;;
 ;;; Copyright (c) 2000 Massachusetts Institute of Technology
 ;;;
                          (list (read-resp-text-tail port)))
                        '())))))))
     (discard-known-char #\] port)
-    (discard-known-char #\space port)
+    ;; Work around a bug in Courier-IMAP; the #\space character is
+    ;; required here, but Courier-IMAP doesn't send it.
+    (if (not (char=? #\return (peek-char-no-eof port)))
+       (discard-known-char #\space port))
     code))
 \f
 (define (read-fetch-response port)