summaryrefslogtreecommitdiff
path: root/lib/net/imap.rb
diff options
context:
space:
mode:
authorshugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-27 06:32:00 +0000
committershugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-08-27 06:32:00 +0000
commit21e4ade56b4261c549fd03f96f4430946d028bea (patch)
treedce69a18a1e0e6526dde029c8fe835f4ce5d7e88 /lib/net/imap.rb
parent917beef327117cfeee4e1f455d650f08c2268d7e (diff)
lib/net/imap.rb: Accept continuation requests without response text
The IMAP server of DOCOMO returns such continuation requests. [ruby-list:50558] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net/imap.rb')
-rw-r--r--lib/net/imap.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index dc185183cd..bb6754c732 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -964,7 +964,7 @@ module Net
@idle_done_cond.wait(timeout)
@idle_done_cond = nil
if @receiver_thread_terminating
- raise Net::IMAP::Error, "connection closed"
+ raise @exception || Net::IMAP::Error.new("connection closed")
end
ensure
unless @receiver_thread_terminating
@@ -2268,8 +2268,13 @@ module Net
def continue_req
match(T_PLUS)
- match(T_SPACE)
- return ContinuationRequest.new(resp_text, @str)
+ token = lookahead
+ if token.symbol == T_SPACE
+ shift_token
+ return ContinuationRequest.new(resp_text, @str)
+ else
+ return ContinuationRequest.new(ResponseText.new(nil, ""), @str)
+ end
end
def response_untagged