Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c17a268

Browse files
committed
Added support for RFC 850 style dates, as used by some HTTP servers
(such as Netscape-Commerce and CERN). An example of a RFC 850 date: 'Wednesday, 18-Dec-96 21:00:00 GMT' From: Chris Lawrence <[email protected]>
1 parent 178ff35 commit c17a268

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Lib/rfc822.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ def parsedate_tz(data):
417417
if data[0][-1] == ',':
418418
# There's a dayname here. Skip it
419419
del data[0]
420+
if len(data) == 3: # RFC 850 date, deprecated
421+
stuff = string.split(data[0], '-')
422+
if len(stuff) == 3:
423+
data = stuff + data[1:]
420424
if len(data) == 4:
421425
s = data[3]
422426
i = string.find(s, '+')

0 commit comments

Comments
 (0)