From: Art Cancro Date: Fri, 10 Dec 2010 17:26:25 +0000 (-0500) Subject: Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel X-Git-Tag: v8.01~527 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=909a9b946eccd5b3adf2b8e081f2c1d40bd41f00;hp=06189cea8146e80cbb594c3ee0facb462c8953c1;p=citadel.git Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel --- diff --git a/libcitadel/lib/mime_parser.c b/libcitadel/lib/mime_parser.c index 56336ba6a..e6d65e9f4 100644 --- a/libcitadel/lib/mime_parser.c +++ b/libcitadel/lib/mime_parser.c @@ -636,8 +636,11 @@ static void recurseable_mime_parser(char *partnum, SubMimeHeaders, m); if ((next_boundary != NULL) && - (next_boundary - part_start < 3)) + (next_boundary - part_start < 3)) { + FlushInterestingMimes(SubMimeHeaders); + continue; + } if ( (part_start != NULL) && (next_boundary != NULL) ) { part_end = next_boundary; diff --git a/webcit/po/webcit/es.po b/webcit/po/webcit/es.po index e9499c5d3..08a244fb8 100644 --- a/webcit/po/webcit/es.po +++ b/webcit/po/webcit/es.po @@ -14,8 +14,7 @@ msgstr "" "POT-Creation-Date: 2010-09-16 13:47+0200\n" "PO-Revision-Date: 2010-11-21 00:30+0000\n" "Last-Translator: Gabriel C. Huertas \n" -""Last-Translator: Fitoschido \n" -Language-Team: Spanish \n" +"Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/webcit/webcit.c b/webcit/webcit.c index 64b42ee0a..a23482421 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -482,23 +482,22 @@ void seconds_since_last_gexp(void) int ReadPostData(void) { int rc; - int body_start = 0; + int urlencoded_post = 0; wcsession *WCC = WC; StrBuf *content = NULL; + urlencoded_post = (strncasecmp(ChrPtr(WCC->Hdr->HR.ContentType), "application/x-www-form-urlencoded", 33) == 0) ; + content = NewStrBufPlain(NULL, WCC->Hdr->HR.ContentLength + 256); - StrBufPrintf(content, + if (!urlencoded_post) + { + StrBufPrintf(content, "Content-type: %s\n" - "Content-length: %ld\n\n", - ChrPtr(WCC->Hdr->HR.ContentType), + "Content-length: %ld\n\n", + ChrPtr(WCC->Hdr->HR.ContentType), WCC->Hdr->HR.ContentLength); -/* - hprintf("Content-type: %s\n" - "Content-length: %d\n\n", - ContentType, ContentLength); -*/ - body_start = StrLength(content); + } /** Read the entire input data at once. */ rc = client_read_to(WCC->Hdr, content, @@ -508,8 +507,7 @@ int ReadPostData(void) return rc; - if (!strncasecmp(ChrPtr(WCC->Hdr->HR.ContentType), "application/x-www-form-urlencoded", 33)) { - StrBufCutLeft(content, body_start); + if (urlencoded_post) { ParseURLParams(content); } else if (!strncasecmp(ChrPtr(WCC->Hdr->HR.ContentType), "multipart", 9)) { char *Buf;