spost accept body lines with 998 characters
[mmh] / uip / spost.c
index 505b94c..fd0cbcc 100644 (file)
@@ -39,6 +39,7 @@ static struct swit switches[] = {
        { NULL, 0 }
 };
 
+char *version=VERSION;
 
 /* flags for headers->flags */
 #define HNOP  0x0000  /* just used to keep .set around */
@@ -244,7 +245,7 @@ main(int argc, char **argv)
                        finish_headers(out);
                        fprintf(out, "\n%s", f.value);
                        while ((state = m_getfld2(state, &f, in)) == BODY2) {
-                               if (f.valuelen >= NAMESZ) {
+                               if (f.valuelen > NAMESZ+1 || (!f.crlf && f.valuelen > NAMESZ)) {
                                        adios(EX_DATAERR, NULL, "Body contains a to long line");
                                }
                                fputs(f.value, out);