go-imap icon indicating copy to clipboard operation
go-imap copied to clipboard

compatible with non-compliant responses with excessive SPACE

Open qjebbs opened this issue 6 months ago • 1 comments

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

qjebbs avatar Feb 23 '24 03:02 qjebbs

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.

qjebbs avatar Feb 25 '24 08:02 qjebbs

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.

qjebbs avatar Feb 27 '24 03:02 qjebbs

#596

qjebbs avatar Feb 28 '24 01:02 qjebbs