mhbuild implement header folding
[mmh] / uip / mhoutsbr.c
index 87e7943..2915afe 100644 (file)
@@ -161,12 +161,15 @@ static void
 output_headers(CT ct, FILE *out)
 {
        HF hp;
+       charstring_t body = charstring_create(0);
 
        hp = ct->c_first_hf;
        while (hp) {
-               fprintf(out, "%s:%s", hp->name, hp->value);
+               fold(body, strlen(hp->name), hp->value);
+               fprintf(out, "%s:%s", hp->name, charstring_buffer(body));
                hp = hp->next;
        }
+       charstring_free(body);
 }