Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
authorArt Cancro <ajc@citadel.org>
Fri, 10 Dec 2010 17:26:25 +0000 (12:26 -0500)
committerArt Cancro <ajc@citadel.org>
Fri, 10 Dec 2010 17:26:25 +0000 (12:26 -0500)
libcitadel/lib/mime_parser.c
webcit/po/webcit/es.po
webcit/webcit.c

index 56336ba6afe445421a1db9b3cb37c9a47780d7b2..e6d65e9f42be5dfd13bfd392a37e554399df37cf 100644 (file)
@@ -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;
index e9499c5d30ae4ce6a95273500d0b28c3590d7e56..08a244fb8d248f58b719d32ddd56c0df2fb4f5de 100644 (file)
@@ -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 <gabrielhuertas@terra.es>\n"
-""Last-Translator: Fitoschido <Unknown>\n"
-Language-Team: Spanish <room_citadel_translators@uncensored.citadel.org>\n"
+"Language-Team: Spanish <room_citadel_translators@uncensored.citadel.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
index 64b42ee0ab63a292be29c8b6a8a787516296c17f..a234824210c9cba351648a4b078ecaf3d03dcf89 100644 (file)
@@ -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;