emersion / go-imap

📥 An IMAP library for clients and servers
MIT License
2.02k stars 288 forks source link

compatible with non-compliant responses with excessive SPACE #594

Closed qjebbs closed 4 months ago

qjebbs commented 4 months ago

This PR improves compatibility with non-compliant servers, by skipping excessive SPACE between elements and the trailing SPACE

related: #571 #540

qjebbs commented 4 months ago

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 commented 4 months ago

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 commented 4 months ago

596