From mime4j-dev-return-1200-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Tue Jan 11 07:49:48 2011 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 65375 invoked from network); 11 Jan 2011 07:49:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jan 2011 07:49:48 -0000 Received: (qmail 62355 invoked by uid 500); 11 Jan 2011 07:49:48 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 62295 invoked by uid 500); 11 Jan 2011 07:49:46 -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 62287 invoked by uid 99); 11 Jan 2011 07:49:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jan 2011 07:49:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [80.68.94.31] (HELO mta.unknown.za.net) (80.68.94.31) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jan 2011 07:49:38 +0000 Received: from bpet (dsl-240-99-239.telkomadsl.co.za [41.240.99.239]) by mta.unknown.za.net (Postfix) with ESMTPSA id A10C24A558 for ; Tue, 11 Jan 2011 09:49:16 +0200 (SAST) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by bpet (Postfix) with ESMTP id 4A007102F for ; Tue, 11 Jan 2011 09:49:14 +0200 (SAST) Message-ID: <4D2C0B7A.7030509@unknown.za.net> Date: Tue, 11 Jan 2011 09:49:14 +0200 From: Jesse Long User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: mime4j-dev@james.apache.org Subject: Incorrect line length limitation while parsing headers Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi, Please see the following code in mime4j 0.6: http://james.apache.org/mime4j/xref/org/apache/james/mime4j/parser/AbstractEntity.html#133 The for loop checks for excess line length in headers based on the complete length of the header, not on each individual line in the header. So, my header like this: X-Header-Name: <980 chars> <20 chars> <25 chars> fails, because the complete length of the header is > 1000, however, no line in the mime message is longer than 1000 chars... I suggest just removing the check for excess line length in the fillFieldBuffer() method. Cheers, Jesse