You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Lars Martin <La...@smb-tec.com> on 2007/10/29 17:31:53 UTC

error in datefieldparser

Hi list, when parsing emails received from Ebay I get the following error:

org.apache.james.mime4j.field.DateTimeField$Parser: Parsing value 'Sat, 
27 Oct 07 02:19:54 GMT-0700': Encountered "-" at line 1, column 28.

The complete header field is: "Date: Sun, 28 Oct 07 08:25:31 GMT-0700"

Is it possible to make the parser more robust here? The javax.mail 
parser can parse the header without any problem. Any hints? Thx, Lars
-- 
______________________________________________________________________
Lars Martin                             mailto:Lars.Martin@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com
D-04103 Leipzig                                      Gutenbergplatz 1e
Tel: +49-(0)341-699 46 04                    Fax: +49-(0)341-699 47 04
HRB 17509, Amtsgericht Leipzig            Geschäftsführer: Lars Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: error in datefieldparser

Posted by Robert Burrell Donkin <ro...@gmail.com>.
On Oct 29, 2007 4:31 PM, Lars Martin <La...@smb-tec.com> wrote:
> Hi list, when parsing emails received from Ebay I get the following error:
>
> org.apache.james.mime4j.field.DateTimeField$Parser: Parsing value 'Sat,
> 27 Oct 07 02:19:54 GMT-0700': Encountered "-" at line 1, column 28.
>
> The complete header field is: "Date: Sun, 28 Oct 07 08:25:31 GMT-0700"
>
> Is it possible to make the parser more robust here?

i think that this message is not an RFC822 email

my reading of the zone production is that the timezone can either be
specified as GMT (amongst others) or by an offset from UT ("-0700")
but not both

> The javax.mail
> parser can parse the header without any problem. Any hints?

quite possibly because the header was created using JavaMail

Mime4J is quite strict and standards compliant. however, i don't see
why (providing that this was not the default) the users couldn't be
allow to opt for fuzzy date parsing

opinions?

- robert

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org