rohrpost

A commandline mail client to change the world as we see it.
git clone git://r-36.net/rohrpost
Log | Files | Refs | README | LICENSE

commit 6ddf9b917b96f8a5c4a758235b2a981671b531ac
parent 7511bb4e2babb078723a3372e1902e2cc99225ec
Author: Christoph Lohmann <20h@r-36.net>
Date:   Thu,  4 Jul 2024 21:39:26 +0200

Fix new mime header heuristics for simple lines.

Diffstat:
Mmime.c | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/mime.c b/mime.c @@ -955,7 +955,7 @@ mime_parsebufintern(mime_t *mime, char *str, int len) * End of headers. */ if (strlen(buf) == 0) { - //printf("end of headers '%c'\n", p[0]); + //printf("end of headers '%c' + '%c'\n", p[0], p[1]); /* * Heuristics for ugly e-mail generators * follow. @@ -983,6 +983,15 @@ mime_parsebufintern(mime_t *mime, char *str, int len) goto mimeparsebufbodyparse; } } + /* + * A line simply ended with no header + * suspicion. + */ + if (key[0] == '\n') { + mime->rawhdrs = memdupz(str, (p - str)); + mime->rawhdrslen = p - str; + goto mimeparsebufbodyparse; + } } /*