From e5e145e476976488d9f8b80d4f812f35c427f051 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 19 Jul 2005 17:05:23 +0000 Subject: [PATCH] * Removed the last couple of places where forms were submitted using the GET method. POST is just so technologically cleaner that we should use it all the time. * Fixed a bug in the MIME parser that was causing it to not be 8-bit clean. --- webcit/ChangeLog | 8 ++++++++ webcit/listsub.c | 2 +- webcit/mime_parser.c | 19 ++++++++++++++++--- webcit/roomops.c | 4 ++-- webcit/webcit.c | 3 +++ 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 8a0e2811a..ae98bc8d1 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,11 @@ $Log$ +Revision 619.27 2005/07/19 17:05:23 ajc +* Removed the last couple of places where forms were submitted using + the GET method. POST is just so technologically cleaner that we should + use it all the time. +* Fixed a bug in the MIME parser that was causing it to not be 8-bit + clean. + Revision 619.26 2005/07/19 14:23:04 ajc * mime_parser.c: don't default Content-type: to text/plain, because when an HTTP POST operation is performed, the content type is expected to @@ -2712,3 +2719,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/listsub.c b/webcit/listsub.c index b5982f9e4..c37a4836e 100644 --- a/webcit/listsub.c +++ b/webcit/listsub.c @@ -168,7 +168,7 @@ void do_listsub(void) * Any other (invalid) command causes the form to be displayed */ else { -FORM: wprintf("
\n" +FORM: wprintf("\n" "\n" ); diff --git a/webcit/mime_parser.c b/webcit/mime_parser.c index 9315f94e1..ed6719cef 100644 --- a/webcit/mime_parser.c +++ b/webcit/mime_parser.c @@ -20,6 +20,7 @@ #include #include "webcit.h" +#include "webserver.h" #include "mime_parser.h" @@ -268,11 +269,13 @@ void the_mime_parser(char *partnum, { char *ptr; + char *srch = NULL; char *part_start, *part_end = NULL; char buf[SIZ]; char *header; char *boundary; char *startary; + size_t startary_len = 0; char *endary; char *next_boundary; char *content_type; @@ -402,10 +405,20 @@ void the_mime_parser(char *partnum, /* Figure out where the boundaries are */ snprintf(startary, SIZ, "--%s", boundary); snprintf(endary, SIZ, "--%s--", boundary); + startary_len = strlen(startary); part_start = NULL; do { - next_boundary = bmstrstr(ptr, startary, strncmp); + + /* next_boundary = bmstrstr(ptr, startary, memcmp); */ + next_boundary = NULL; + for (srch=ptr; srch
"); - wprintf("\n"); + wprintf("\n"); wprintf("
\n" @@ -2071,7 +2071,7 @@ void display_zap(void) wprintf("disappear from your room list. Is this what you wish "); wprintf("to do?
\n"); - wprintf("\n"); + wprintf("\n"); wprintf(""); wprintf(" "); wprintf(""); diff --git a/webcit/webcit.c b/webcit/webcit.c index 6c29b38e0..3dc05c5fd 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -822,6 +822,9 @@ void upload_handler(char *name, char *filename, char *partnum, char *disp, { struct urlcontent *u; + lprintf(9, "upload_handler() name=%s, type=%s, len=%d\n", + name, cbtype, length); + /* Form fields */ if ( (length > 0) && (strlen(cbtype) == 0) ) { u = (struct urlcontent *) malloc(sizeof(struct urlcontent)); -- 2.30.2