scribo

Email-based phlog generator
git clone git://git.z3bra.org/scribo.git
Log | Files | Refs

commit 09c127c163d5152adfc64e9eb13782c87e43bae8
parent f7d22671f042f57bfe07d2ee31686d2efce8b2fa
Author: Willy Goiffon <dev@z3bra.org>
Date:   Tue,  8 Sep 2020 12:00:22 +0200

Handle both LF and CRLF as a separator between headers and body

Diffstat:
Mscribo.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scribo.c b/scribo.c @@ -100,7 +100,7 @@ parseheaders(FILE *fp, struct headers *head) while ((len = getline(&buf, &bufsiz, fp)) > 0) { /* a single newline mark the end of header section */ - if (!strncmp(buf, "\r\n", 2)) + if (*buf == '\n' || !strncmp(buf, "\r\n", 2)) break; if (isblank(*buf) && h)