Author: maxime
Date: Thu Feb 9 17:07:39 2006
New Revision: 376521
URL: http://svn.apache.org/viewcvs?rev=376521&view=rev
Log:
Fix mail headers bound search, thus avoiding finding headers in the
mail body.
Modified:
httpd/mod_mbox/branches/surgery/src/libmbox/mbox_mime.c
httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c
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=376521&r1=376520&r2=376521&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 17:07:39 2006
@@ -35,10 +35,18 @@
return NULL;
}
- /* Locate the end of part headers */
- headers_bound = ap_strstr(body, "\n\n");
- if (!headers_bound) {
- return NULL;
+ /* Locate the end of part headers. If no Content-Type is provided,
+ we are in a subpart of a multipart message, thus including part
+ headers: the headers bound is '\n\n'. Otherwise, the headers
+ bound is at the begining of the mail body. */
+ if (!ct) {
+ headers_bound = ap_strstr(body, "\n\n");
+ if (!headers_bound) {
+ return NULL;
+ }
+ }
+ else {
+ headers_bound = body;
}
/* If no Content-Type is provided, it means that we are parsing a
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=376521&r1=376520&r2=376521&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 Feb 9 17:07:39 2006
@@ -35,9 +35,14 @@
}
/* Locate the end of part headers */
- headers_bound = ap_strstr(body, "\n\n");
- if (!headers_bound) {
- return NULL;
+ if (!ct) {
+ headers_bound = ap_strstr(body, "\n\n");
+ if (!headers_bound) {
+ return NULL;
+ }
+ }
+ else {
+ headers_bound = body;
}
/* If no Content-Type is provided, it means that we are parsing a
|