$Log$
+Revision 213.18 2001/05/30 01:06:57 ajc
+* Changes to mime parser ... still something wrong
+
Revision 213.17 2001/05/28 19:27:29 ajc
* Fixed bug which marked all messages in Lobby as old before reading at login
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
strcpy(header, "");
do {
ptr = memreadline(ptr, buf, sizeof buf);
- if (*ptr == 0)
- return; /* premature end of message */
+ /* if (*ptr == 0)
+ return; premature end of message */
if (content_end != NULL)
if (ptr >= content_end)
return;
}
part_start = ptr;
}
- } while ( (strcasecmp(buf, endary)) && (ptr != 0) );
+ } while ( (strcasecmp(buf, endary)) && (ptr <= content_end) );
END_MULTI: if (PostMultiPartCallBack != NULL) {
PostMultiPartCallBack("", "", partnum, "", NULL,
content_type, 0, encoding, userdata);
/* If it's not a multipart message, then do something with it */
if (!is_multipart) {
+ fprintf(stderr, "doing non-multipart thing\n");
part_start = ptr;
length = 0;
- while ((*ptr != 0)
- && ((content_end == NULL) || (ptr < content_end))) {
+ while ( ( (*ptr != 0) && (content_end != NULL) )
+ || (ptr < content_end) ) {
++length;
part_end = ptr++;
}
struct httprequest *hptr;
char browser_host[256];
char user_agent[256];
+ FILE *fp;
/* We stuff these with the values coming from the client cookies,
* so we can use them to reconnect a timed out session if we have to.
"application/x-www-form-urlencoded", 33)) {
addurls(content);
} else if (!strncasecmp(ContentType, "multipart", 9)) {
+ fp = fopen("mime.out", "wb");
+ fwrite(content, ContentLength, 1, fp);
+ fclose(fp);
content_end = content + ContentLength;
mime_parser(content, content_end, *upload_handler,
NULL, NULL, NULL, 0);