tHandle both LF and CRLF as a separator between headers and body - scribo - Email-based phlog generator
 (HTM) git clone git://git.z3bra.org/scribo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 09c127c163d5152adfc64e9eb13782c87e43bae8
 (DIR) parent f7d22671f042f57bfe07d2ee31686d2efce8b2fa
 (HTM) 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:
         M scribo.c                            |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/scribo.c b/scribo.c
       t@@ -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)