Return-Path: X-Original-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6448D10BE for ; Tue, 19 Apr 2011 15:03:43 +0000 (UTC) Received: (qmail 69289 invoked by uid 500); 19 Apr 2011 15:03:43 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 69264 invoked by uid 500); 19 Apr 2011 15:03:43 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 69254 invoked by uid 99); 19 Apr 2011 15:03:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 15:03:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of apache@bago.org designates 209.85.216.177 as permitted sender) Received: from [209.85.216.177] (HELO mail-qy0-f177.google.com) (209.85.216.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Apr 2011 15:03:35 +0000 Received: by qyl38 with SMTP id 38so5812727qyl.1 for ; Tue, 19 Apr 2011 08:03:13 -0700 (PDT) Received: by 10.229.137.149 with SMTP id w21mr4577049qct.59.1303225393665; Tue, 19 Apr 2011 08:03:13 -0700 (PDT) Received: from mail-vx0-f177.google.com ([209.85.220.177]) by mx.google.com with ESMTPS id g28sm4774907qck.15.2011.04.19.08.03.12 (version=SSLv3 cipher=OTHER); Tue, 19 Apr 2011 08:03:13 -0700 (PDT) Received: by vxd2 with SMTP id 2so7502868vxd.22 for ; Tue, 19 Apr 2011 08:03:12 -0700 (PDT) Received: by 10.52.186.133 with SMTP id fk5mr8879069vdc.184.1303225392067; Tue, 19 Apr 2011 08:03:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.67.105 with HTTP; Tue, 19 Apr 2011 08:02:52 -0700 (PDT) X-Originating-IP: [78.134.13.35] In-Reply-To: <20110419145336.9F6552388962@eris.apache.org> References: <20110419145336.9F6552388962@eris.apache.org> From: Stefano Bagnara Date: Tue, 19 Apr 2011 17:02:52 +0200 Message-ID: Subject: Re: svn commit: r1095104 - in /james/mime4j/trunk/core/src/main/java/org/apache/james/mime4j: io/MimeBoundaryInputStream.java stream/Event.java stream/MimeEntity.java To: mime4j-dev@james.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2011/4/19 : > Author: olegk > Date: Tue Apr 19 14:53:36 2011 > New Revision: 1095104 > > URL: http://svn.apache.org/viewvc?rev=3D1095104&view=3Drev > Log: > Moved presence of whitespace chars in boundary check from MimeBoundaryInp= utStream's constructor to MimeEntity where this protocol violation can be h= anlded leniently depending on the parsing mode [..] > + =A0 =A0/** Indicates that while space characters have been found in the= boundary */ > + =A0 =A0public static final Event WHITESPACE_IN_BOUNDARY > + =A0 =A0 =A0 =A0=3D new Event("Boundary may not contain CR or LF"); This does not seem intuitive. CR or LF are not what is commonly known as "white space". CR and LF cannot be present inside a boundary, even in lenient mode. Instead a single space (0x20) is allowed in the boundary (IIRC). I don't think we need to "monitor" the presence of a real white space. Stefano