emersion / go-imap

📥 An IMAP library for clients and servers
MIT License
2.1k stars 296 forks source link

Allow continuous SP for all commands #653

Closed qjebbs closed 4 days ago

qjebbs commented 5 days ago

Before logged in, imap-n.global-mail.cn sends:

* CAPABILITY IMAP4<...>LITERAL+<SP><SP>STARTTLS<...>SPECIAL-USE
qjebbs commented 5 days ago

This is another solution for the same problem as #652, by not adding for dec.SP() {} everywhere, solving all these kind of problems.

emersion commented 4 days ago

I prefer to not add broad workarounds like these, so that we stay as close to the RFC as possible, and only relax our parsing when absolutely necessary.