$Log$
+ Revision 590.157 2002/03/19 04:19:33 ajc
+ * Saw what IO did with strchr() and did the same in a few more places
+
Revision 590.156 2002/03/17 00:08:02 error
* mime_parser.c: more robust parsing of Content-Type header
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
strcat(header, buf);
} while ((strlen(buf) > 0) && (*ptr != 0));
- for (i = 0; i < strlen(disposition); ++i)
- if (disposition[i] == ';')
- disposition[i] = 0;
- while (isspace(disposition[0]))
- strcpy(disposition, &disposition[1]);
- for (i = 0; i < strlen(content_type); ++i)
- if (content_type[i] == ';')
- content_type[i] = 0;
- while (isspace(content_type[0]))
- strcpy(content_type, &content_type[1]);
+ if (strchr(disposition, ';'))
+ *(strchr(disposition, ';')) = '\0';
+ striplt(disposition);
+ if (strchr(content_type, ';'))
+ *(strchr(content_type, ';')) = '\0';
+ striplt(content_type);
if (strlen(boundary) > 0) {
is_multipart = 1;