AlkantarClanX12

Your IP : 3.144.106.207


Current Path : /proc/thread-self/root/opt/alt/python33/lib64/python3.3/http/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python33/lib64/python3.3/http/__pycache__/cookies.cpython-33.pyo

�
��f�Qc
@sdZddlZddlZdddgZdjZdjZdjZGd	d�de�Z	ej
ejd
Zi�dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6dUdV6dWdX6dYdZ6d[d\6d]d^6d_d`6dadb6dcdd6dedf6dgdh6didj6dkdl6dmdn6dodp6dqdr6dsdt6dudv6dwdx6dydz6d{d|6d}d~6dd�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d6dd6dd6dd6dd6d	d
6dd6d
d6dd6dd6dd6dd6dd6dd6dd6dd6dd 6d!d"6d#d$6d%d&6d'd(6d)d*6d+d,6d-d.6d/d06d1d26d3d46d5d66d7d86d9d:6d;d<6d=d>6d?d@6dAdB6dCdD6dEdF6dGdH6dIdJ6dKdL6dMdN6dOdP6dQdR6dSdT6Z
edUdV�ZejdW�ZejdX�ZdYdZ�Zd[d\d]d^d_d`dagZddbdcdddedfdgdhdidjdkdldmg
Zdeedndo�ZGdpdq�dqe�ZdrZedsZejdteduedvej�ZGdwd�de�ZGdxd�de�ZdS(yu.

Here's a sample session to show how to use this module.
At the moment, this is the only documentation.

The Basics
----------

Importing is easy...

   >>> from http import cookies

Most of the time you start by creating a cookie.

   >>> C = cookies.SimpleCookie()

Once you've created your Cookie, you can add values just as if it were
a dictionary.

   >>> C = cookies.SimpleCookie()
   >>> C["fig"] = "newton"
   >>> C["sugar"] = "wafer"
   >>> C.output()
   'Set-Cookie: fig=newton\r\nSet-Cookie: sugar=wafer'

Notice that the printable representation of a Cookie is the
appropriate format for a Set-Cookie: header.  This is the
default behavior.  You can change the header and printed
attributes by using the .output() function

   >>> C = cookies.SimpleCookie()
   >>> C["rocky"] = "road"
   >>> C["rocky"]["path"] = "/cookie"
   >>> print(C.output(header="Cookie:"))
   Cookie: rocky=road; Path=/cookie
   >>> print(C.output(attrs=[], header="Cookie:"))
   Cookie: rocky=road

The load() method of a Cookie extracts cookies from a string.  In a
CGI script, you would use this method to extract the cookies from the
HTTP_COOKIE environment variable.

   >>> C = cookies.SimpleCookie()
   >>> C.load("chips=ahoy; vienna=finger")
   >>> C.output()
   'Set-Cookie: chips=ahoy\r\nSet-Cookie: vienna=finger'

The load() method is darn-tootin smart about identifying cookies
within a string.  Escaped quotation marks, nested semicolons, and other
such trickeries do not confuse it.

   >>> C = cookies.SimpleCookie()
   >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
   >>> print(C)
   Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"

Each element of the Cookie also supports all of the RFC 2109
Cookie attributes.  Here's an example which sets the Path
attribute.

   >>> C = cookies.SimpleCookie()
   >>> C["oreo"] = "doublestuff"
   >>> C["oreo"]["path"] = "/"
   >>> print(C)
   Set-Cookie: oreo=doublestuff; Path=/

Each dictionary element has a 'value' attribute, which gives you
back the value associated with the key.

   >>> C = cookies.SimpleCookie()
   >>> C["twix"] = "none for you"
   >>> C["twix"].value
   'none for you'

The SimpleCookie expects that all values should be standard strings.
Just to be sure, SimpleCookie invokes the str() builtin to convert
the value to a string, when the values are set dictionary-style.

   >>> C = cookies.SimpleCookie()
   >>> C["number"] = 7
   >>> C["string"] = "seven"
   >>> C["number"].value
   '7'
   >>> C["string"].value
   'seven'
   >>> C.output()
   'Set-Cookie: number=7\r\nSet-Cookie: string=seven'

Finis.
iNuCookieErroru
BaseCookieuSimpleCookieuu; u cBs|EeZdZdS(uCookieErrorN(u__name__u
__module__u__qualname__(u
__locals__((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuCookieError�su!#$%&'*+-.^_`|~:u\000uu\001uu\002uu\003uu\004uu\005uu\006uu\007uu\010uu\011u	u\012u
u\013uu\014uu\015u
u\016uu\017uu\020uu\021uu\022uu\023uu\024uu\025uu\026uu\027uu\030uu\031uu\032uu\033uu\034uu\035uu\036uu\037uu\054u,u\073u;u\"u"u\\u\u\177uu\200u€u\201uu\202u‚u\203uƒu\204u„u\205u…u\206u†u\207u‡u\210uˆu\211u‰u\212uŠu\213u‹u\214uŒu\215uu\216uŽu\217uu\220uu\221u‘u\222u’u\223u“u\224u”u\225u•u\226u–u\227u—u\230u˜u\231u™u\232ušu\233u›u\234uœu\235uu\236užu\237uŸu\240u u\241u¡u\242u¢u\243u£u\244u¤u\245u¥u\246u¦u\247u§u\250u¨u\251u©u\252uªu\253u«u\254u¬u\255u­u\256u®u\257u¯u\260u°u\261u±u\262u²u\263u³u\264u´u\265uµu\266u¶u\267u·u\270u¸u\271u¹u\272uºu\273u»u\274u¼u\275u½u\276u¾u\277u¿u\300uÀu\301uÁu\302uÂu\303uÃu\304uÄu\305uÅu\306uÆu\307uÇu\310uÈu\311uÉu\312uÊu\313uËu\314uÌu\315uÍu\316uÎu\317uÏu\320uÐu\321uÑu\322uÒu\323uÓu\324uÔu\325uÕu\326uÖu\327u×u\330uØu\331uÙu\332uÚu\333uÛu\334uÜu\335uÝu\336uÞu\337ußu\340uàu\341uáu\342uâu\343uãu\344uäu\345uåu\346uæu\347uçu\350uèu\351uéu\352uêu\353uëu\354uìu\355uíu\356uîu\357uïu\360uðu\361uñu\362uòu\363uóu\364uôu\365uõu\366uöu\367u÷u\370uøu\371uùu\372uúu\373uûu\374uüu\375uýu\376uþu\377uÿcsFt�fdd�|D��r#|Sdtdd�|D��dSdS(u�Quote a string for use in a cookie header.

    If the string does not need to be double-quoted, then just return the
    string.  Otherwise, surround the string in doublequotes and quote
    (with a \) special characters.
    c3s|]}|�kVqdS(N((u.0uc(u
LegalChars(u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu	<genexpr>�su_quote.<locals>.<genexpr>u"css!|]}tj||�VqdS(N(u_Translatoruget(u.0us((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu	<genexpr>�sN(uallu	_nulljoin(ustru
LegalChars((u
LegalCharsu1/opt/alt/python33/lib64/python3.3/http/cookies.pyu_quote�su_quoteu\\[0-3][0-7][0-7]u[\\].cCs�t|�dkr|S|ddks6|ddkr:|S|dd�}d}t|�}g}xHd|ko||knr�tj||�}tj||�}|r�|r�|j||d��Pnd	}}|r�|jd�}n|r|jd�}n|rZ|s!||krZ|j|||��|j||d�|d}qe|j|||��|jtt||d|d�d���|d}qeWt|�S(
Niiu"iiii����i����i����(	ulenu
_OctalPattusearchu
_QuotePattuappendustartuchruintu	_nulljoin(ustruiunuresuo_matchuq_matchujuk((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu_unquote�s6 

.u_unquoteuMonuTueuWeduThuuFriuSatuSunuJanuFebuMaruApruMayuJunuJuluAuguSepuOctuNovuDecc	Csoddlm}m}|�}|||�\	}}}}	}
}}}
}d|||||||	|
|fS(Ni(ugmtimeutimeu#%s, %02d %3s %4d %02d:%02d:%02d GMT(utimeugmtime(ufutureuweekdaynameu	monthnameugmtimeutimeunowuyearumonthudayuhhummussuwduyuz((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu_getdate)s
	+u_getdatecBs�|EeZdZdZidd6dd6dd6dd6d	d
6dd6dd6d
d6ZddhZdd�Zdd�Zdd�Ze	dd�Z
d ddd�ZeZ
dd�Zd dd�Zd dd�Zd S(!uMorselu�A class to hold ONE (key, value) pair.

    In a cookie, each such pair may have several attributes, so this class is
    used to keep the attributes associated with the appropriate key,value pair.
    This class also includes a coded_value attribute, which is used to hold
    the network representation of the value.  This is most useful when Python
    objects are pickled for network transit.
    uexpiresuPathupathuCommentucommentuDomainudomainuMax-Ageumax-ageusecureuhttponlyuVersionuversioncCsBd|_|_|_x$|jD]}tj||d�q!WdS(Nu(uNoneukeyuvalueucoded_valueu	_reservedudictu__setitem__(uselfukey((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__init__TsuMorsel.__init__cCsE|j�}||jkr.td|��ntj|||�dS(NuInvalid Attribute %s(uloweru	_reserveduCookieErrorudictu__setitem__(uselfuKuV((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__setitem__\suMorsel.__setitem__cCs|j�|jkS(N(uloweru	_reserved(uselfuK((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu
isReservedKeybsuMorsel.isReservedKeycsy|j�|jkr(td|��nt�fdd�|D��rZtd|��n||_||_||_dS(Nu!Attempt to set a reserved key: %sc3s|]}|�kVqdS(N((u.0uc(u
LegalChars(u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu	<genexpr>jsuMorsel.set.<locals>.<genexpr>uIllegal key value: %s(uloweru	_reserveduCookieErroruanyukeyuvalueucoded_value(uselfukeyuvalu	coded_valu
LegalChars((u
LegalCharsu1/opt/alt/python33/lib64/python3.3/http/cookies.pyusetes		u
Morsel.setuSet-Cookie:cCsd||j|�fS(Nu%s %s(uOutputString(uselfuattrsuheader((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuoutputrsu
Morsel.outputcCs#d|jj|jt|j�fS(Nu<%s: %s=%s>(u	__class__u__name__ukeyurepruvalue(uself((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__repr__wsuMorsel.__repr__cCsd|j|�jdd�S(Nu�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "%s";
        // end hiding -->
        </script>
        u"u\"(uOutputStringureplace(uselfuattrs((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu	js_output{suMorsel.js_outputcCswg}|j}|d|j|jf�|dkrA|j}nt|j��}x|D]\}}|dkrxqZn||kr�qZn|dkr�t|t�r�|d|j|t	|�f�qZ|dkrt|t�r|d|j||f�qZ|dkr(|t
|j|��qZ|dkrN|t
|j|��qZ|d|j||f�qZWt|�S(Nu%s=%suuexpiresumax-ageu%s=%dusecureuhttponly(uappendukeyucoded_valueuNoneu	_reservedusorteduitemsu
isinstanceuintu_getdateustru_semispacejoin(uselfuattrsuresultuappenduitemsukeyuvalue((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuOutputString�s*	$uMorsel.OutputStringN(u__name__u
__module__u__qualname__u__doc__u	_reservedu_flagsu__init__u__setitem__u
isReservedKeyu_LegalCharsusetuNoneuoutputu__str__u__repr__u	js_outputuOutputString(u
__locals__((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuMorsel1s(


uMorselu,\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=u\[\]u�
    (?x)                           # This is a verbose pattern
    \s*                            # Optional whitespace at start of cookie
    (?P<key>                       # Start of group 'key'
    [u	]+?   # Any word of at least one letter
    )                              # End of group 'key'
    (                              # Optional group: there may not be a value.
    \s*=\s*                          # Equal Sign
    (?P<val>                         # Start of group 'val'
    "(?:[^\\"]|\\.)*"                  # Any doublequoted string
    |                                  # or
    \w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT  # Special case for "expires" attr
    |                                  # or
    [u-]*      # Any word or empty string
    )                                # End of group 'val'
    )?                             # End of optional value group
    \s*                            # Any number of spaces.
    (\s+|;|$)                      # Ending either at space, semicolon, or EOS.
    cBs�|EeZdZdZdd�Zdd�Zddd�Zdd	�Zd
d�Z	ddd
dd�Z
e
Zdd�Zddd�Z
dd�Zedd�ZdS(u
BaseCookieu'A container class for a set of Morsels.cCs
||fS(u
real_value, coded_value = value_decode(STRING)
        Called prior to setting a cookie's value from the network
        representation.  The VALUE is the value read from HTTP
        header.
        Override this function to modify the behavior of cookies.
        ((uselfuval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuvalue_decode�suBaseCookie.value_decodecCst|�}||fS(u�real_value, coded_value = value_encode(VALUE)
        Called prior to setting a cookie's value from the dictionary
        representation.  The VALUE is the value being assigned.
        Override this function to modify the behavior of cookies.
        (ustr(uselfuvalustrval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuvalue_encode�suBaseCookie.value_encodecCs|r|j|�ndS(N(uload(uselfuinput((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__init__�suBaseCookie.__init__cCs?|j|t��}|j|||�tj|||�dS(u+Private method for setting a cookie's valueN(ugetuMorselusetudictu__setitem__(uselfukeyu
real_valueucoded_valueuM((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__set�suBaseCookie.__setcCs,|j|�\}}|j|||�dS(uDictionary style assignment.N(uvalue_encodeu_BaseCookie__set(uselfukeyuvalueurvalucval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__setitem__�suBaseCookie.__setitem__uSet-Cookie:u
cCsUg}t|j��}x-|D]%\}}|j|j||��qW|j|�S(u"Return a string suitable for HTTP.(usorteduitemsuappenduoutputujoin(uselfuattrsuheaderusepuresultuitemsukeyuvalue((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuoutput�s
uBaseCookie.outputcCsig}t|j��}x4|D],\}}|jd|t|j�f�qWd|jjt|�fS(Nu%s=%su<%s: %s>(usorteduitemsuappendurepruvalueu	__class__u__name__u
_spacejoin(uselfuluitemsukeyuvalue((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__repr__�s
$uBaseCookie.__repr__cCsOg}t|j��}x*|D]"\}}|j|j|��qWt|�S(u(Return a string suitable for JavaScript.(usorteduitemsuappendu	js_outputu	_nulljoin(uselfuattrsuresultuitemsukeyuvalue((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu	js_output�s
uBaseCookie.js_outputcCsJt|t�r|j|�n'x$|j�D]\}}|||<q,WdS(u�Load cookies from a string (presumably HTTP_COOKIE) or
        from a dictionary.  Loading cookies from a dictionary 'd'
        is equivalent to calling:
            map(Cookie.__setitem__, d.keys(), d.values())
        N(u
isinstanceustru_BaseCookie__parse_stringuitems(uselfurawdataukeyuvalue((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuloads
uBaseCookie.loadcCs\d}t|�}d}x=d|ko2|knrW|j||�}|sSPn|jd�|jd�}}|jd�}|ddkr�|rT|||dd�<qTq|j�tjkr|rT|dkr�|j�tjkr
d||<q
qt
|�||<qTq|dk	r|j|�\}	}
|j||	|
�||}qqWdS(Niukeyuvalu$iT(
ulenuNoneumatchugroupuenduloweruMorselu	_reservedu_flagsuTrueu_unquoteuvalue_decodeu_BaseCookie__set(uselfustrupattuiunuMumatchukeyuvalueurvalucval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu__parse_strings,uBaseCookie.__parse_stringN(u__name__u
__module__u__qualname__u__doc__uvalue_decodeuvalue_encodeuNoneu__init__u_BaseCookie__setu__setitem__uoutputu__str__u__repr__u	js_outputuloadu_CookiePatternu_BaseCookie__parse_string(u
__locals__((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu
BaseCookie�s		cBs2|EeZdZdZdd�Zdd�ZdS(uSimpleCookieu�
    SimpleCookie supports strings as cookie values.  When setting
    the value using the dictionary assignment notation, SimpleCookie
    calls the builtin str() to convert the value to a string.  Values
    received from HTTP are kept as strings.
    cCst|�|fS(N(u_unquote(uselfuval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuvalue_decode>suSimpleCookie.value_decodecCst|�}|t|�fS(N(ustru_quote(uselfuvalustrval((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuvalue_encodeAsuSimpleCookie.value_encodeN(u__name__u
__module__u__qualname__u__doc__uvalue_decodeuvalue_encode(u
__locals__((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyuSimpleCookie7s(u__doc__ureustringu__all__ujoinu	_nulljoinu_semispacejoinu
_spacejoinu	ExceptionuCookieErroru
ascii_lettersudigitsu_LegalCharsu_Translatoru_quoteucompileu
_OctalPattu
_QuotePattu_unquoteu_weekdaynameuNoneu
_monthnameu_getdateudictuMorselu_LegalKeyCharsu_LegalValueCharsuASCIIu_CookiePatternu
BaseCookieuSimpleCookie(((u1/opt/alt/python33/lib64/python3.3/http/cookies.pyu<module>s�			
2~

n