Ignore:
Timestamp:
Mar 19, 2014, 11:11:30 AM (11 years ago)
Author:
dmik
Message:

python: Update vendor to 2.7.6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/vendor/current/Lib/Cookie.py

    r2 r388  
    239239# into a 4 character sequence: a forward-slash followed by the
    240240# three-digit octal equivalent of the character.  Any '\' or '"' is
    241 # quoted with a preceeding '\' slash.
     241# quoted with a preceding '\' slash.
    242242#
    243243# These are taken from RFC2068 and RFC2109.
     
    258258    '\033' : '\\033',  '\034' : '\\034',  '\035' : '\\035',
    259259    '\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',
    260265
    261266    '"' : '\\"',       '\\' : '\\\\',
     
    386391    now = time()
    387392    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" % \
    389394           (weekdayname[wd], day, monthname[month], year, hh, mm, ss)
    390395
     
    478483        // end hiding -->
    479484        </script>
    480         """ % ( self.OutputString(attrs), )
     485        """ % ( self.OutputString(attrs).replace('"',r'\"'), )
    481486    # end js_output()
    482487
     
    534539    r"(?P<val>"                   # Start of group 'val'
    535540    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
    536543    r"|"                            # or
    537544    ""+ _LegalCharsPatt +"*"        # Any word or empty string
Note: See TracChangeset for help on using the changeset viewer.