Bug #1249573: fix rfc822.parsedate not accepting a certain date format

(backport from rev. 53522)
This commit is contained in:
Georg Brandl 2007-01-22 21:10:43 +00:00
parent f446a9b00a
commit 742e39296a
1 changed files with 5 additions and 0 deletions

View File

@ -854,6 +854,11 @@ def parsedate_tz(data):
if data[0][-1] in (',', '.') or data[0].lower() in _daynames:
# There's a dayname here. Skip it
del data[0]
else:
# no space after the "weekday,"?
i = data[0].rfind(',')
if i >= 0:
data[0] = data[0][i+1:]
if len(data) == 3: # RFC 850 date, deprecated
stuff = data[0].split('-')
if len(stuff) == 3: