N
Nemesis
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 ",".
I studied the parsedate_tz code and the problem is on its third line:
....
if not data:
return None
data = data.split()
....
After the split I have:
['Tue,26', 'Jul', '2005', '13:14:27', 'GMT', '+0200']
but "Tue," and "26" should be separated.
Of course parsedate_tz correctly decode the field if you add a space
after the ",".
Do you think that's a bug?
Which is the most correct place where to file this bug?
¹ 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
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 ",".
I studied the parsedate_tz code and the problem is on its third line:
....
if not data:
return None
data = data.split()
....
After the split I have:
['Tue,26', 'Jul', '2005', '13:14:27', 'GMT', '+0200']
but "Tue," and "26" should be separated.
Of course parsedate_tz correctly decode the field if you add a space
after the ",".
Do you think that's a bug?
Which is the most correct place where to file this bug?
¹ 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