Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 42641 invoked from network); 7 Jan 2006 08:52:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jan 2006 08:52:50 -0000 Received: (qmail 12862 invoked by uid 500); 7 Jan 2006 08:52:47 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 12824 invoked by uid 500); 7 Jan 2006 08:52:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 12813 invoked by uid 99); 7 Jan 2006 08:52:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 00:52:47 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [207.155.248.122] (HELO conqueror.cnchost.com) (207.155.248.122) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 00:52:46 -0800 Received: from [192.168.0.21] (c-24-13-128-132.hsd1.il.comcast.net [24.13.128.132]) by conqueror.cnchost.com id DAA06385; Sat, 7 Jan 2006 03:52:25 -0500 (EST) [ConcentricHost SMTP Relay 1.17] Errors-To: Message-ID: <43BF80CF.80209@rowe-clan.net> Date: Sat, 07 Jan 2006 02:50:23 -0600 From: "William A. Rowe, Jr." User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r366174 - /httpd/mod_mbox/trunk/module-2.0/mod_mbox_mime.c References: <20060105124954.52862.qmail@minotaur.apache.org> <22271E5C-AF52-4EB1-AB77-9B5B5FF10990@gbiv.com> In-Reply-To: <22271E5C-AF52-4EB1-AB77-9B5B5FF10990@gbiv.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Roy T. Fielding wrote: > On Jan 5, 2006, at 4:49 AM, maxime@apache.org wrote: > >> + In order to handle empty boundaries, we'll look for the >> + boundary plus the \n. */ >> + >> + 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? Why not + boundary_line = apr_pstrcat(p, "--", mail->boundary, "\r\n", NULL); which should be far faster than a regex evaluation?