[Python-checkins] r53522 - python/trunk/Lib/rfc822.py
georg.brandl
python-checkins at python.org
Mon Jan 22 22:10:34 CET 2007
Author: georg.brandl
Date: Mon Jan 22 22:10:33 2007
New Revision: 53522
Modified:
python/trunk/Lib/rfc822.py
Log:
Bug #1249573: fix rfc822.parsedate not accepting a certain date format
Modified: python/trunk/Lib/rfc822.py
==============================================================================
--- python/trunk/Lib/rfc822.py (original)
+++ python/trunk/Lib/rfc822.py Mon Jan 22 22:10:33 2007
@@ -854,6 +854,11 @@
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:
More information about the Python-checkins
mailing list