httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r376491 - in /httpd/mod_mbox/branches/surgery/src: libmbox/mbox_mime.c module/Makefile.am
Date Thu, 09 Feb 2006 23:46:36 GMT
Author: maxime
Date: Thu Feb  9 15:46:35 2006
New Revision: 376491

URL: http://svn.apache.org/viewcvs?rev=376491&view=rev
Log:
Make the module link correctly, backport fix from trunk.  Better headers
handling (in some cases, mod_mbox did not put back the correct character
thus making impossible the double EOL search as end of headers).


Modified:
    httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c
    httpd/mod_mbox/branches/surgery/src/module/Makefile.am

Modified: httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c?rev=376491&r1=376490&r2=376491&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c (original)
+++ httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c Thu Feb  9 15:46:35 2006
@@ -29,6 +29,7 @@
     mbox_mime_message_t *mail;
     char *tmp = NULL, *k = NULL, *end_bound = NULL;
     char *headers_bound = NULL;
+    char eol = 0;
 
     if (!body) {
         return NULL;
@@ -59,12 +60,14 @@
         /* Isolate the Content-Type string (between 'Content-Type: '
            and ';' or end of line */
         if (k && k < headers_bound) {
+            eol = *k;
             *k = 0;
         }
         else {
             k = tmp;
             while (*k) {
                 if (isspace(*k)) {
+                    eol = *k;
                     *k = 0;
                     break;
                 }
@@ -74,7 +77,7 @@
 
         /* Copy the Content-Type and reset *k */
         mail->content_type = apr_pstrdup(p, tmp);
-        *k = ';';
+        *k = eol;
 
         /* If available, get MIME part name */
         tmp = ap_strstr(body, "name=");
@@ -84,6 +87,7 @@
 
             while (*k) {
                 if (isspace(*k) || *k == ';') {
+                    eol = *k;
                     *k = 0;
                     break;
                 }
@@ -98,7 +102,7 @@
                 mail->content_name = apr_pstrdup(p, tmp);
             }
 
-            *k = ';';
+            *k = eol;
         }
     }
     else {
@@ -115,6 +119,7 @@
 
         while (*k) {
             if (isspace(*k) || *k == ';') {
+                eol = *k;
                 *k = 0;
                 break;
             }
@@ -123,7 +128,7 @@
 
         /* Copy the Content-Disposition and reset *k */
         mail->content_disposition = apr_pstrdup(p, tmp);
-        *k = '\n';
+        *k = eol;
     }
     else {
         mail->content_disposition = apr_pstrdup(p, "inline");
@@ -139,6 +144,7 @@
 
               while (*k) {
                   if (isspace(*k) || *k == ';') {
+                      eol = *k;
                       *k = 0;
                       break;
                   }
@@ -147,7 +153,7 @@
 
               /* Copy the Content-Disposition and reset *k */
               mail->cte = mbox_parse_cte_header(tmp);
-              *k = '\n';
+              *k = eol;
           }
       }
     else {
@@ -246,10 +252,6 @@
                 *t = '-';
 
                 search = inbound + strlen(mail->boundary) + 1;
-
-                if (mail->sub[count-1] && mail->sub[count-1]->body) {
-                    mail->sub[count-1]->body_len = inbound - mail->sub[count-1]->body
- 2;
-                }
             }
 
             /* Otherwise, the MIME part is finished. */

Modified: httpd/mod_mbox/branches/surgery/src/module/Makefile.am
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/branches/surgery/src/module/Makefile.am?rev=376491&r1=376490&r2=376491&view=diff
==============================================================================
--- httpd/mod_mbox/branches/surgery/src/module/Makefile.am (original)
+++ httpd/mod_mbox/branches/surgery/src/module/Makefile.am Thu Feb  9 15:46:35 2006
@@ -5,6 +5,7 @@
   mod_mbox_file.c   \
   mod_mbox_out.c    \
   mod_mbox_search.c \
+  mod_mbox_mime.c   \
   mod_mbox_index.c
 
 mod_mbox_la_LIBADD = $(top_builddir)/src/libmbox/libmbox.la
@@ -13,4 +14,5 @@
 
 pkglib_LTLIBRARIES = mod_mbox.la
 pkginclude_HEADERS = mod_mbox.h
+pkglibdir = ${AP_LIBEXECDIR}
 



Mime
View raw message