Closed qjebbs closed 4 months ago
Hm, I'd prefer to only diverge from the standard where it's actually needed by some servers. For instance if you haven't hit servers sending <SP><SP>
I'd prefer to keep rejecting that. Otherwise we might be seeing more servers breaking the standard in more new ways…
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.
I'd prefer not to reflect non-standard server quirks in the API.
Hm, I'd prefer to only diverge from the standard where it's actually needed by some servers. For instance if you haven't hit servers sending
<SP><SP>
I'd prefer to keep rejecting that. Otherwise we might be seeing more servers breaking the standard in more new ways…
Updated.
Your opinion makes sense from a library maintainer's perspective, but from users' perspective like me, by solving all potential issues I can foresee, I can maximize the compatibility of the program (including the lib it uses), not to break down on new servers time to time. That's what I did in the first two commits.
This PR improves compatibility with non-compliant servers, by skipping excessive SPACE between elements and the trailing SPACE
* CAPABILITY IMAP4<SP>IMAP4rev1<SP><CRLF>
* SEARCH<SP><CRLF>
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.related: #571 #540