Menu

#498 Fix sqimap_get_small_header_list() for IMAP servers not tolerating trailing spaces in header fields

open
nobody
None
5
2023-03-03
2023-03-03
krizalys
No

In FETCH queries, some IMAP servers don't tolerate trailing spaces in HEADER.FIELDS

Here is a live example error produced by imap.ionos.fr (screenshot attached):

ERROR: Bad or malformed request.
Query: FETCH XXX,YYY,ZZZ (FLAGS UID RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority Importance Priority Content-Type )])
Server responded: expected 1*ASTRING-CHAR / string instead of ")"

This patch resolves this issue by injecting in the header fields an empty string instead of a single-space string when there are no extra header fields.

2 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.