Skip to content

Commit e14bdef

Browse files
committed
🩹 Workaround for buggy CAPABILITY response [🚧 test]
1 parent 079167e commit e14bdef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net/imap/response_parser.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,10 +1761,10 @@ def enable_data
17611761
UntaggedResponse.new label("ENABLED"), capability__list, @str
17621762
end
17631763

1764-
# As a workaround for buggy servers, allow a trailing SP:
1765-
# *(SP capability) [SP]
1764+
# As a workaround for buggy servers, allow extra spaces:
1765+
# *(SP *SP capability) *SP
17661766
def capability__list
1767-
list = []; while SP? && (capa = capability?) do list << capa end; list
1767+
list = []; while accept_spaces && (capa = capability?) do list << capa end; list
17681768
end
17691769

17701770
alias resp_code__capability capability__list

0 commit comments

Comments
 (0)