From: Chris Hanson Date: Mon, 22 May 2000 15:24:50 +0000 (+0000) Subject: Fix bug: server continuation lines not being parsed correctly. X-Git-Tag: 20090517-FFI~3745 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=169a24c2c3a69c607849a780c7d88cc91c119e5f;p=mit-scheme.git Fix bug: server continuation lines not being parsed correctly. --- diff --git a/v7/src/imail/imap-response.scm b/v7/src/imail/imap-response.scm index e9c927bdf..bd66d0f69 100644 --- a/v7/src/imail/imap-response.scm +++ b/v7/src/imail/imap-response.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imap-response.scm,v 1.23 2000/05/21 00:03:05 cph Exp $ +;;; $Id: imap-response.scm,v 1.24 2000/05/22 15:24:50 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -26,23 +26,23 @@ (let ((tag (read-string-internal char-set:space port))) (if (eof-object? tag) tag - (begin - (discard-known-char #\space port) - (let ((response - (cond ((string=? "+" tag) - (cons 'CONTINUE (read-response-text port))) - ((string=? "*" tag) - (read-untagged-response port)) - ((let ((end (string-length tag))) - (let ((index (imap:match:tag tag 0 end))) - (and index - (fix:= index end)))) - (read-tagged-response tag port)) - (else - (error "Malformed server response:" tag))))) - (discard-known-char #\return port) - (discard-known-char #\linefeed port) - response))))) + (let ((response + (if (string=? "+" tag) + (cons 'CONTINUE (read-response-text port)) + (begin + (discard-known-char #\space port) + (cond ((string=? "*" tag) + (read-untagged-response port)) + ((let ((end (string-length tag))) + (let ((index (imap:match:tag tag 0 end))) + (and index + (fix:= index end)))) + (read-tagged-response tag port)) + (else + (error "Malformed server response:" tag))))))) + (discard-known-char #\return port) + (discard-known-char #\linefeed port) + response)))) (define (read-untagged-response port) (let ((x (read-atom port)))