commit 2d04f7548e0a48c655dd3505fa08669e31b77e77
parent b251494a79fa791fa8076398554740fd65fa5d27
Author: Christoph Lohmann <20h@r-36.net>
Date: Sat, 4 Oct 2025 21:53:20 +0200
Do header parsing as the RFCs intended.
Diffstat:
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/mime.c b/mime.c
@@ -964,11 +964,12 @@ mime_parsebufintern(mime_t *mime, char *str, int len)
* Does the line begin with "--"? Looks
* like a boundary. Go to next body part.
*/
+ /*
if (p[0] == '-' && p[1] == '-') {
mime->rawhdrs = memdupz(str, (p - str));
mime->rawhdrslen = p - str;
goto mimeparsebufbodyparse;
- }
+ }*/
/*
* TODO: Find Apple and Google developers
* and teach them how to not do this.
@@ -989,11 +990,15 @@ mime_parsebufintern(mime_t *mime, char *str, int len)
* A line simply ended with no header.
* That is suspicious.
*/
+ /*
if (key[0] == '\n') {
mime->rawhdrs = memdupz(str, (p - str));
mime->rawhdrslen = p - str;
goto mimeparsebufbodyparse;
- }
+ }*/
+ mime->rawhdrs = memdupz(str, (p - str));
+ mime->rawhdrslen = p - str;
+ goto mimeparsebufbodyparse;
}
/*