mirror of https://github.com/python/cpython.git
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 <quango@themall.net>
This commit is contained in:
parent
178ff353e8
commit
c17a268398
|
@ -417,6 +417,10 @@ def parsedate_tz(data):
|
|||
if data[0][-1] == ',':
|
||||
# There's a dayname here. Skip it
|
||||
del data[0]
|
||||
if len(data) == 3: # RFC 850 date, deprecated
|
||||
stuff = string.split(data[0], '-')
|
||||
if len(stuff) == 3:
|
||||
data = stuff + data[1:]
|
||||
if len(data) == 4:
|
||||
s = data[3]
|
||||
i = string.find(s, '+')
|
||||
|
|
Loading…
Reference in New Issue