diff options
author | Georg Brandl <georg@python.org> | 2007-01-22 21:10:43 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-01-22 21:10:43 (GMT) |
commit | 742e39296a80a72cba06fdfd3b25abbb6e723885 (patch) | |
tree | 8b03d08425b6f8afe7a62e4936238492d095041b /Lib/rfc822.py | |
parent | f446a9b00a50ffe6041447cb2b8b252cc315ac69 (diff) | |
download | cpython-742e39296a80a72cba06fdfd3b25abbb6e723885.zip cpython-742e39296a80a72cba06fdfd3b25abbb6e723885.tar.gz cpython-742e39296a80a72cba06fdfd3b25abbb6e723885.tar.bz2 |
Bug #1249573: fix rfc822.parsedate not accepting a certain date format
(backport from rev. 53522)
Diffstat (limited to 'Lib/rfc822.py')
-rw-r--r-- | Lib/rfc822.py | 5 |
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: |