mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
merge revision(s) 59372: [Backport #13649]
lib/net/imap.rb: Ignore trailing space for Microsoft Exchange Server Based on the patch by keysen (Jeremy Carlier). [ruby-core:81641] [Bug #13649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@61369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3fa526562e
commit
b9b7cf6dfb
3 changed files with 18 additions and 1 deletions
|
|
@ -2199,6 +2199,10 @@ module Net
|
|||
else
|
||||
result = response_tagged
|
||||
end
|
||||
while lookahead.symbol == T_SPACE
|
||||
# Ignore trailing space for Microsoft Exchange Server
|
||||
shift_token
|
||||
end
|
||||
match(T_CRLF)
|
||||
match(T_EOF)
|
||||
return result
|
||||
|
|
|
|||
|
|
@ -291,4 +291,17 @@ EOF
|
|||
assert_equal("test.xml", body.parts[1].disposition.param["FILENAME"])
|
||||
assert_equal(nil, body.parts[1].language)
|
||||
end
|
||||
|
||||
# [Bug #13649]
|
||||
def test_status
|
||||
parser = Net::IMAP::ResponseParser.new
|
||||
response = parser.parse("* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234)\r\n")
|
||||
assert_equal("STATUS", response.name)
|
||||
assert_equal("INBOX", response.data.mailbox)
|
||||
assert_equal(1234, response.data.attr["UIDVALIDITY"])
|
||||
response = parser.parse("* STATUS INBOX (UIDNEXT 1 UIDVALIDITY 1234) \r\n")
|
||||
assert_equal("STATUS", response.name)
|
||||
assert_equal("INBOX", response.data.mailbox)
|
||||
assert_equal(1234, response.data.attr["UIDVALIDITY"])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#define RUBY_VERSION "2.4.4"
|
||||
#define RUBY_RELEASE_DATE "2017-12-21"
|
||||
#define RUBY_PATCHLEVEL 216
|
||||
#define RUBY_PATCHLEVEL 217
|
||||
|
||||
#define RUBY_RELEASE_YEAR 2017
|
||||
#define RUBY_RELEASE_MONTH 12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue