Nemesis <[EMAIL PROTECTED]> wrote:
>
>Hi all,
>I found that the function parsedate_tz of the rfc822 module has a bug
>(or at least I think so).
>I found a usenet article (message-id: <[EMAIL PROTECTED]>)
>that has this Date field:
>
>Date: Tue,26 Jul 2005 13:14:27 GMT +0200
>
>It seems to be correct¹, but parsedate_tz is not able to decode it, it
>is confused by the absence of a space after the ",".

Fascinating.  I've written a lot of e-mail programs, and I would have bet
real money that this was not legal by either RFC822 or 2822, but the BNF
certainly supports your assertion that this is valid.

RFC1036, which gives the format for Usenet articles, includes the space in
its "suggested" date format.

>¹ and looking at rfc822 par3.3 it should be correct:
>
>date-time       =       [ day-of-week "," ] date FWS time [CFWS]
>
>day-of-week     =       ([FWS] day-name) / obs-day-of-week
>
>day-name        =       "Mon" / "Tue" / "Wed" / "Thu" /
>                        "Fri" / "Sat" / "Sun"
>
>date            =       day month year

This is actually from RFC2822, but the point is the same.
-- 
- Tim Roberts, [EMAIL PROTECTED]
  Providenza & Boekelheide, Inc.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to