summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-01-22 21:10:33 (GMT)
committerGeorg Brandl <georg@python.org>2007-01-22 21:10:33 (GMT)
commit626349526e2d26a58cc92319983aa9a7309fe06d (patch)
treeebc0627c5f365f66d376133c486fbfb7aac6605f /Lib
parentb94c0c3ea1769b093900080fee5d8a6602da7a7e (diff)
downloadcpython-626349526e2d26a58cc92319983aa9a7309fe06d.zip
cpython-626349526e2d26a58cc92319983aa9a7309fe06d.tar.gz
cpython-626349526e2d26a58cc92319983aa9a7309fe06d.tar.bz2
Bug #1249573: fix rfc822.parsedate not accepting a certain date format
Diffstat (limited to 'Lib')
-rw-r--r--Lib/rfc822.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/rfc822.py b/Lib/rfc822.py
index d6d5e47..14cc729 100644
--- a/Lib/rfc822.py
+++ b/Lib/rfc822.py
@@ -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: