james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Long <je...@virtualpostman.co.za>
Subject Incorrect line length limitation while parsing headers
Date Tue, 11 Jan 2011 07:46:54 GMT
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><CRLF>
<20 chars><CRLF>
<25 chars><CRLF>

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

Mime
View raw message