From: Guilhem Moulin Date: Thu, 3 Mar 2016 21:28:46 +0000 (+0100) Subject: Relax parsing of continuation requests for for empty resp-text. X-Git-Url: https://git.g-eek.se/?a=commitdiff_plain;h=48ddc7416f1934b6569ada559c3473de6cf6e4b8;p=interimap.git Relax parsing of continuation requests for for empty resp-text. microsoft's IMAP server violates RFC 3501 by skipping the trailing space for empty resp-text. --- diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm index 0405794..745e64f 100644 --- a/lib/Net/IMAP/InterIMAP.pm +++ b/lib/Net/IMAP/InterIMAP.pm @@ -2249,7 +2249,8 @@ sub _resp($$;$$$) { } } } - elsif (s/\A\+ //) { + elsif (s/\A\+// and ($_ eq '' or s/\A //)) { + # microsoft's IMAP server violates RFC 3501 by skipping the trailing ' ' for empty resp-text if (defined $callback and $cmd eq 'AUTHENTICATE') { my $x = $callback->($_); $self->_cmd_extend(\$x);