httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxime Petazzoni <maxime.petazz...@bulix.org>
Subject Re: svn commit: r366174 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c
Date Fri, 06 Jan 2006 01:07:56 GMT
Hi,

* Roy T. Fielding <fielding@gbiv.com> [2006-01-05 16:39:16]:

> >+	boundary_line = apr_pstrcat(p, "--", mail->boundary, "\n", NULL);
> >
> > 	/* The start boundary */
> >-	bound = ap_strstr(mail->body, mail->boundary);
> >+	bound = ap_strstr(mail->body, boundary_line);
> 
> That seems a bit risky -- MIME parts are supposed to have CRLF for
> line terminators, but that code will only search for LF on Unix.
> 
> Would it make more sense to use a regex?

Actually, we could just not search for the \n, the -- prefix is enough
to make the empty boundary problem go away.

Thanks for poiting this out, I did not take care of it while reading the
RFC.

- Sam
-- 
Maxime Petazzoni (http://www.bulix.org)
 -- gone crazy, back soon. leave message.

Mime
View raw message