go-imap
go-imap copied to clipboard
compatible with non-compliant responses with excessive SPACE
This PR improves compatibility with non-compliant servers, by skipping excessive SPACE between elements and the trailing SPACE
- imap.exmail.qq.com:
* CAPABILITY IMAP4<SP>IMAP4rev1<SP><CRLF>
- smtp-n.global-mail.cn:
* SEARCH<SP><CRLF>
related: #571 #540
the second commit skip all potential excessive SPACEs
tries to solve all similar problems as it suggests, but I am not sure if I do it in the right way.
It works good in my env, the only question that comes to mind is whether SP()
, ExpectSP()
needs to be renamed (e.g.: LSP()
for leading Space) for method semantics reasons.
#596