httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From max...@apache.org
Subject svn commit: r366386 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c
Date Fri, 06 Jan 2006 01:36:28 GMT
Author: maxime
Date: Thu Jan  5 17:36:25 2006
New Revision: 366386

URL: http://svn.apache.org/viewcvs?rev=366386&view=rev
Log:
 * module-2.0/mod_mbox_mime.c:
    (mbox_mime_decode_multipart): Be more RFC compliant : allow MIME
     boundary lines to end with LF as well as CRLF.
    

Modified:
    httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c

Modified: httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c
URL: http://svn.apache.org/viewcvs/httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c?rev=366386&r1=366385&r2=366386&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c (original)
+++ httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c Thu Jan  5 17:36:25 2006
@@ -209,7 +209,7 @@
 	 In order to handle empty boundaries, we'll look for the
 	 boundary plus the \n. */
 
-	boundary_line = apr_pstrcat(p, "--", mail->boundary, "\n", NULL);
+	boundary_line = apr_pstrcat(p, "--", mail->boundary, NULL);
 
 	/* The start boundary */
 	bound = ap_strstr(mail->body, boundary_line);
@@ -226,7 +226,7 @@
 	*tmp = 0;
 
 	/* Set the search begining to the line after the start boundary. */
-	search = bound + strlen(boundary_line);
+	search = bound + strlen(boundary_line) + 1;
 
 	/* While the MIME part is not finished, go through all sub parts */
 	while (!end) {
@@ -248,7 +248,7 @@
 	    if (inbound) {
 		*inbound = '-';
 
-		search = inbound + strlen(boundary_line);
+		search = inbound + strlen(boundary_line) + 1;
 
 		if (mail->sub[count-1] && mail->sub[count-1]->body) {
 		    mail->sub[count-1]->body_len = inbound - mail->sub[count-1]->body - 2;



Mime
View raw message