Changeset 388 for python/vendor/current/Lib/Cookie.py
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Lib/Cookie.py
r2 r388 239 239 # into a 4 character sequence: a forward-slash followed by the 240 240 # three-digit octal equivalent of the character. Any '\' or '"' is 241 # quoted with a prece eding '\' slash.241 # quoted with a preceding '\' slash. 242 242 # 243 243 # These are taken from RFC2068 and RFC2109. … … 258 258 '\033' : '\\033', '\034' : '\\034', '\035' : '\\035', 259 259 '\036' : '\\036', '\037' : '\\037', 260 261 # Because of the way browsers really handle cookies (as opposed 262 # to what the RFC says) we also encode , and ; 263 264 ',' : '\\054', ';' : '\\073', 260 265 261 266 '"' : '\\"', '\\' : '\\\\', … … 386 391 now = time() 387 392 year, month, day, hh, mm, ss, wd, y, z = gmtime(now + future) 388 return "%s, %02d -%3s-%4d %02d:%02d:%02d GMT" % \393 return "%s, %02d %3s %4d %02d:%02d:%02d GMT" % \ 389 394 (weekdayname[wd], day, monthname[month], year, hh, mm, ss) 390 395 … … 478 483 // end hiding --> 479 484 </script> 480 """ % ( self.OutputString(attrs) , )485 """ % ( self.OutputString(attrs).replace('"',r'\"'), ) 481 486 # end js_output() 482 487 … … 534 539 r"(?P<val>" # Start of group 'val' 535 540 r'"(?:[^\\"]|\\.)*"' # Any doublequoted string 541 r"|" # or 542 r"\w{3},\s[\s\w\d-]{9,11}\s[\d:]{8}\sGMT" # Special case for "expires" attr 536 543 r"|" # or 537 544 ""+ _LegalCharsPatt +"*" # Any word or empty string
Note:
See TracChangeset
for help on using the changeset viewer.