b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/cookielib.pyc
Size53.95 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:38
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sþdZddddddddd g Zd
d kZd
d kZd
d kZd
d kZd
d kZyd
d kZWne j
od
d k
ZnXd
d k Z d
d k l
Z
eZead
�Zee i�ZdZd�ZdZd�ZdddddddgZdddddddd d!d"d#d$g ZgZx!eD]Zeiei��qEWed%�Z ed&�Z!hed'6ed(6ed)6ed*6Z"ei#d+�Z$d,�Z%d-�Z&ei#d.�Z'ei#d/ei(�Z)ei#d0ei*�Z+d1�Z,ei#d2ei*�Z-d3�Z.d4�Z/ei#d5�Z0ei#d6�Z1ei#d7�Z2ei#d8�Z3d9�Z4ei#d:�Z5d;�Z6d<�Z7d=�Z8ei#d>�Z9d?�Z:d@�Z;dA�Z<dB�Z=ei#dC�Z>dD�Z?dE�Z@dF�ZAdG�ZBdHZCei#dI�ZDdJ�ZEdK�ZFdL�ZGdM�ZHdfdN��YZIdfdO��YZJdeJfdP��YZKdQ�ZLdR�ZMdSfdT��YZNdfdU��YZOdePfdV��YZQdeOfdW��YZRd
dXkSlTZTlUZUd
dYkVlWZWd S(Zs�HTTP cookie handling for web clients.

This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.

Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly from Python attributes.

Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
distributed with the Python standard library, but are available from
http://wwwsearch.sf.net/):

CookieJar____
/ \ FileCookieJar \ / | \ \ MozillaCookieJar | LWPCookieJar \ | | | ---MSIEBase | | / | | | / MSIEDBCookieJar BSDDBCookieJar
|/
MSIECookieJar

tCookiet CookieJart CookiePolicytDefaultCookiePolicyt
FileCookieJart LWPCookieJartlwp_cookie_strt LoadErrortMozillaCookieJariÿÿÿÿN(ttimegmcGs?tpdStpddk}|id�anti|�S(Niÿÿÿÿt cookielib(tdebugtloggertloggingt getLogger(targsR
((s!/usr/lib64/python2.6/cookielib.pyt_debug+s  sQa filename was not supplied (nor was the CookieJar instance initialised with one)cCsgddk}ddk}ddk}|i�}|id|�|i�}|id|dd�dS(Niÿÿÿÿscookielib bug!
%st
stackleveli(twarningst tracebacktStringIOt print_exctNonetgetvaluetwarn(RRRtftmsg((s!/usr/lib64/python2.6/cookielib.pyt_warn_unhandled_exception9s
$  i²cCsÒ|d \}}}}}}|tjo¡d|jo
djno�d|jo
djnoed|jo
djnoGd|jo
djno)d|jo
djno t|�SdSdS( Niii iiii;i=(t
EPOCH_YEARR R(ttttyeartmonthtmdaythourtmintsec((s!/usr/lib64/python2.6/cookielib.pyt_timegmHs
IZ tMontTuetWedtThutFritSattSuntJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDeccCs\|djoti�}nti|�d \}}}}}}d||||||fS(sHReturn a string representing time in seconds since epoch, t.

If the function is called without an argument, it will use the current
time.

The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
representing Universal Time (UTC, aka GMT). An example of this format is:

1994-11-24 08:49:37Z

is%04d-%02d-%02d %02d:%02d:%02dZN(Rttimetgmtime(ttRtmonR R!R"R#((s!/usr/lib64/python2.6/cookielib.pyt time2isozVs

%c Csn|djoti�}nti|�d \}}}}}}}dt||t|d||||fS(sðReturn a string representing time in seconds since epoch, t.

If the function is called without an argument, it will use the current
time.

The format of the returned string is like this:

Wed, DD-Mon-YYYY HH:MM:SS GMT

is"%s %02d-%s-%04d %02d:%02d:%02d GMTiN(RR8R9tDAYStMONTHS(R:RR;R R!R"R#twday((s!/usr/lib64/python2.6/cookielib.pyt
time2netscapegs

(tGMTtUTCtUTtZs^([-+])?(\d\d?):?(\d\d)?$cCs¦d}|tjo
d}n�ti|�}|oodt|id��}|id�o!|dt|id��}n|id�djo | }q¢n|S(Niiiii<it-(Rt UTC_ZONESt TIMEZONE_REtsearchtinttgroup(ttztoffsettm((s!/usr/lib64/python2.6/cookielib.pytoffset_from_tz_string{s

!c
Csyti|i��d}Wnftj
oZyt|�}Wntj
odSXd|jo
djno
|}q�dSnX|djo
d}n|djo
d}n|djo
d}nt|�}t|�}t|�}t|�}t|�}|djo�titi��d}|d} |}
||| }| |
} t| �djo)| djo|d}q�|d}q�nt |||||||f�} | dj oO|djo
d}n|i
�}t |�} | djodS| | } n| S(Nii iièidi2RB( t MONTHS_LOWERtindextlowert
ValueErrorRIRR8t localtimetabsR$tupperRN(
tdayR;tyrthrR"R#RKtimontcur_yrRMttmpR:RL((s!/usr/lib64/python2.6/cookielib.pyt _str2time�sR
 





     



!


  
sV^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$s+^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*sÒ^
(\d\d?) # day
(?:\s+|[-\/])
(\w+) # month
(?:\s+|[-\/])
(\d+) # year
(?:
(?:\s+|:) # separator before clock
(\d\d?):(\d\d) # hour:min
(?::(\d\d))? # optional seconds
)? # optional clock
\s*
([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone
\s*
(?:\(\w+\))? # ASCII representation of timezone in parens.
\s*$c Cs8ti|�}|o~|i�}ti|di��d}t|d�|t|d�t|d�t|d�t|d�f}t|�S|i �}t
i d|d�}d gd\}}}}}} }
t
i|�}|d j o%|i�\}}}}}} }
nd St|||||| |
�S(
sÕReturns time in seconds since epoch of time represented by a string.

Return value is an integer.

None is returned if the format of str is unrecognized, the time is outside
the representable range, or the timezone string is not recognized. If the
string contains no timezone, UTC is assumed.

The timezone in the string may be numerical (like "-0800" or "+0100") or a
string timezone (like "UTC", "GMT", "BST" or "EST"). Currently, only the
timezone strings equivalent to UTC (zero offset) are known to the function.

The function loosely parses the following formats:

Wed, 09 Feb 1994 22:23:32 GMT -- HTTP format
Tuesday, 08-Feb-94 14:15:29 GMT -- old rfc850 HTTP format
Tuesday, 08-Feb-1994 14:15:29 GMT -- broken rfc850 HTTP format
09 Feb 1994 22:23:32 GMT -- HTTP format (no weekday)
08-Feb-94 14:15:29 GMT -- rfc850 format (no weekday)
08-Feb-1994 14:15:29 GMT -- broken rfc850 format (no weekday)

The parser ignores leading and trailing whitespace. The time may be
absent.

If the year is given with only 2 digits, the function will select the
century that makes the year closest to the current date.

iiiiiitiN(tSTRICT_DATE_RERHtgroupsRORPRQRItfloatR$tlstript
WEEKDAY_REtsubRtLOOSE_HTTP_DATE_RER\( ttextRMtgR;RRVRWRXR"R#RK((s!/usr/lib64/python2.6/cookielib.pyt http2timeÔs -  "
%sÆ^
(\d{4}) # year
[-\/]?
(\d\d?) # numerical month
[-\/]?
(\d\d?) # day
(?:
(?:\s+|[-:Tt]) # separator before clock
(\d\d?):?(\d\d) # hour:min
(?::?(\d\d(?:\.\d*)?))? # optional seconds (and fractional)
)? # optional clock
\s*
([-+]?\d\d?:?(:?\d\d)?
|Z|z)? # timezone (Z is "zero meridian", i.e. GMT)
\s*$c
Cs�|i�}dgd\}}}}}}}ti|�}|dj o(|i�\}}}}}}}} ndSt|||||||�S(sv
As for http2time, but parses the ISO 8601 formats:

1994-02-03 14:15:29 -0100 -- ISO 8601 format
1994-02-03 14:15:29 -- zone is optional
1994-02-03 -- only date
1994-02-03T14:15:29 -- Use T as separator
19940203T141529Z -- ISO 8601 compact format
19940203 -- only date

iN(RaRt ISO_DATE_RERHR_R\(
ReRVR;RWRXR"R#RKRMt_((s!/usr/lib64/python2.6/cookielib.pytiso2times
"
(cCs+|id�\}}|i| |i|S(s)Return unmatched part of re.Match object.i(tspantstring(tmatchtstarttend((s!/usr/lib64/python2.6/cookielib.pyt unmatched=ss^\s*([^=\s;,]+)s&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"s^\s*=\s*([^\s;,]*)s\\(.)c
CsÉt|t� pt�g}x¤|D]�}|}g}xo|ogti|�}|oÀt|�}|id�}ti|�}|o1t|�}|id�}ti d|�}nHt
i|�}|o+t|�}|id�}|i �}nd}|i
||f�q:|i�id�o2|i�d}|o|i
|�ng}q:tidd|�\}} | djptd|||f�|}q:W|o|i
|�q%q%W|S( smParse header values into a list of lists containing key,value pairs.

The function knows how to deal with ",", ";" and "=" as well as quoted
values after "=". A list of space separated tokens are parsed as if they
were separated by ";".

If the header_values passed as argument contains multiple values, then they
are treated as if they were a single value separated by comma ",".

This means that this function is useful for parsing header fields that
follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
the requirement for tokens).

headers = #header
header = (token | parameter) *( [";"] (token | parameter))

token = 1*<any CHAR except CTLs or separators>
separators = "(" | ")" | "<" | ">" | "@"
| "," | ";" | ":" | "\" | <">
| "/" | "[" | "]" | "?" | "="
| "{" | "}" | SP | HT

quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
qdtext = <any TEXT except <">>
quoted-pair = "\" CHAR

parameter = attribute "=" value
attribute = token
value = token | quoted-string

Each header is represented by a list of key/value pairs. The value for a
simple token (not part of a parameter) is None. Syntactically incorrect
headers will not necessarily be parsed as you would want.

This is easier to describe with some examples:

>>> split_header_words(['foo="bar"; port="80,81"; discard, bar=baz'])
[[('foo', 'bar'), ('port', '80,81'), ('discard', None)], [('bar', 'baz')]]
>>> split_header_words(['text/html; charset="iso-8859-1"'])
[[('text/html', None), ('charset', 'iso-8859-1')]]
>>> split_header_words([r'Basic realm="\"foo\bar\""'])
[[('Basic', None), ('realm', '"foobar"')]]

is\1t,s^[=\s;]*R]is&split_header_words bug: '%s', '%s', %sN(t
isinstancet
basestringtAssertionErrortHEADER_TOKEN_RERHRpRJtHEADER_QUOTED_VALUE_REtHEADER_ESCAPE_RERctHEADER_VALUE_REtrstripRtappendRat
startswithtretsubn(
t
header_valuestresultRet orig_texttpairsRMtnametvaluetnon_junkt
nr_junk_chars((s!/usr/lib64/python2.6/cookielib.pytsplit_header_wordsFsJ-   
 s([\"\\])cCsÃg}x­|D]¥}g}xu|D]m\}}|dj oGtid|�p tid|�}d|}nd||f}n|i|�q W|o|idi|��q
q
Wdi|�S(s»Do the inverse (almost) of the conversion done by split_header_words.

Takes a list of lists of (key, value) pairs and produces a single header
value. Attribute values are quoted if needed.

>>> join_header_words([[("text/plain", None), ("charset", "iso-8859/1")]])
'text/plain; charset="iso-8859/1"'
>>> join_header_words([[("text/plain", None)], [("charset", "iso-8859/1")]])
'text/plain, charset="iso-8859/1"'

s^\w+$s\\\1s"%s"s%s=%ss; s, N(RR|RHtHEADER_JOIN_ESCAPE_RERcRztjoin(tliststheadersR�tattrtktv((s!/usr/lib64/python2.6/cookielib.pytjoin_header_words�s  
cCs@|id�o|d}n|id�o|d }n|S(Nt"iiÿÿÿÿ(R{tendswith(Re((s!/usr/lib64/python2.6/cookielib.pyt
_strip_quotesµs
c Csxd}g}xe|D]]}g}t}xttid|��D]þ\}}|i�}|d joq>nd
|jo|d}} n(tid |d �\}} |i�}|d
jom|i�}
|
|jo
|
}n|djot| �} t }n|djot
t| ��} q)n|i || f�q>W|o)|p|i d�n|i |�qqW|S(s5Ad-hoc parser for Netscape protocol cookie-attributes.

The old Netscape cookie format for Set-Cookie can for instance contain
an unquoted "," in the expires field, so we have to use this ad-hoc
parser instead of split_header_words.

XXX This may not make the best possible effort to parse all the crap
that Netscape Cookie headers contain. Ronald Tschalar's HTTPClient
parser is probably better, so could do worse than following that if
this ever gives any trouble.

Currently, this is also used for parsing RFC 2109 cookies.

texpirestdomaintpathtsecuretversiontportsmax-ages;\s*R]t=s\s*=\s*iit0(sexpiressdomainspathssecuresversionsportsmax-ageN(sversionR�( tFalset enumerateR|tsplitRyRRaRQR�tTrueRgRz( t
ns_headerst known_attrsRt ns_headerR�t version_settiitparamR�R�tlc((s!/usr/lib64/python2.6/cookielib.pytparse_ns_headers¼s>  

 
 


 

s\.\d+$cCsRti|�otS|djotS|ddjp|ddjotStS(s*Return True if text is a host domain name.R]it.iÿÿÿÿ(tIPV4_RERHR�R�(Re((s!/usr/lib64/python2.6/cookielib.pytis_HDNñs
"cCs�|i�}|i�}||jotSt|�ptS|i|�}|djp
|djotS|id�ptSt|d�ptStS(sýReturn True if domain A domain-matches domain B, according to RFC 2965.

A and B may be host domain names or IP addresses.

RFC 2965, section 1:

Host names can be specified either as an IP address or a HDN string.
Sometimes we compare one host name with another. (Such comparisons SHALL
be case-insensitive.) Host A's name domain-matches host B's if

* their host name strings string-compare equal; or

* A is a HDN string and has the form NB, where N is a non-empty
name string, B has the form .B', and B' is a HDN string. (So,
x.y.com domain-matches .Y.com but not Y.com.)

Note that domain-match is not a commutative operation: a.b.c.com
domain-matches .c.com, but not the reverse.

iÿÿÿÿiR¦i(RQR�R¨R�trfindR{(tAtBti((s!/usr/lib64/python2.6/cookielib.pyt domain_matchs  

cCsti|�otStS(sdReturn True if text is a sort-of-like a host domain name.

For accepting/blocking domains.

(R§RHR�R�(Re((s!/usr/lib64/python2.6/cookielib.pytliberal_is_HDN'scCs�|i�}|i�}t|�o
t|�p||jotStS|id�}|o|i|�otS| o||jotStS(s\For blocking/accepting domains.

A and B may be host domain names or IP addresses.

R¦(RQR®R�R�R{R�(RªR«t initial_dot((s!/usr/lib64/python2.6/cookielib.pytuser_domain_match1s  
s:\d+$cCsa|i�}ti|�d}|djo|idd�}ntid|d�}|i�S(s�Return request-host, as defined by RFC 2965.

Variation from RFC: returned value is lowercased, for convenient
comparison.

iR]tHost(t get_full_urlturlparset
get_headert cut_port_reRcRQ(trequestturlthost((s!/usr/lib64/python2.6/cookielib.pyt request_hostFs  
cCsOt|�}}|id�djoti|� o|d}n||fS(szReturn a tuple (request-host, effective request-host name).

As defined by RFC 2965, except both are lowercased.

R¦iÿÿÿÿs.local(R¹tfindR§RH(R¶terhntreq_host((s!/usr/lib64/python2.6/cookielib.pyteff_request_hostVs'cCsL|i�}ti|�}t|i�}|id�pd|}n|S(s6Path component of request-URI, as defined by RFC 2965.t/(R²R³turlsplitt escape_pathR�R{(R¶R·tpartsR�((s!/usr/lib64/python2.6/cookielib.pyt request_pathas  cCsv|i�}|id�}|djoD||d}yt|�Wqrtj
otd|�dSXnt}|S(Nt:iisnonnumeric port: '%s'(tget_hostRºRIRRRRtDEFAULT_HTTP_PORT(R¶R¸R¬R�((s!/usr/lib64/python2.6/cookielib.pyt request_portks 


s%/;:@&=+$,!~*'()s%([0-9a-fA-F][0-9a-fA-F])cCsd|id�i�S(Ns%%%si(RJRU(Rm((s!/usr/lib64/python2.6/cookielib.pytuppercase_escaped_char}scCsKt|t�o|id�}nti|t�}tit|�}|S(sEEscape any invalid characters in HTTP URL, and uppercase all escapes.sutf-8( RrtunicodetencodeturllibtquotetHTTP_PATH_SAFEtESCAPED_CHAR_RERcRÇ(R�((s!/usr/lib64/python2.6/cookielib.pyRÀs

cCsq|id�}|djoQ||d}|id�}t|�o#|djp
|djo d|Sn|S(sBReturn reach of host h, as defined by RFC 2965, section 1.

The reach R of a host name H is defined as follows:

* If

- H is the host domain name of a host; and,

- H has the form A.B; and

- A has no embedded (that is, interior) dots; and

- B has at least one embedded dot, or B is the string "local".
then the reach of H is .B.

* Otherwise, the reach of H is H.

>>> reach("www.acme.com")
'.acme.com'
>>> reach("acme.com")
'acme.com'
>>> reach("acme.local")
'.local'

R¦iitlocal(RºR¨(thR¬tb((s!/usr/lib64/python2.6/cookielib.pytreach�s
'
cCs5t|�}t|t|i���ptStSdS(sÜ

RFC 2965, section 3.3.6:

An unverifiable transaction is to a third-party host if its request-
host U does not domain-match the reach R of the request-host O in the
origin transaction.

N(R¹R­RÑtget_origin_req_hostR�R�(R¶R¼((s!/usr/lib64/python2.6/cookielib.pytis_third_party²s
cBsVeZdZed�Zd�Zdd�Zd�Zdd�Z d�Z
d�Z RS( sÐHTTP Cookie.

This class represents both Netscape and RFC 2965 cookies.

This is deliberately a very simple class. It just holds attributes. It's
possible to construct Cookie instances that don't comply with the cookie
standards. CookieJar.make_cookies is the factory function for Cookie
objects -- it deals with cookie parsing, supplying defaults, and
normalising to the representation used in this class. CookiePolicy is
responsible for checking them to see whether they should be accepted from
and returned to the server.

Note that the port may be present in the headers, but unspecified ("Port"
rather than"Port=80", for example); if this is the case, port is None.

cCs|dj ot|�}n| dj ot| �} n|djo|tjotd��n||_||_||_||_||_|i �|_
||_ ||_ | |_
|
|_| |_| |_|
|_||_||_||_ti|�|_dS(Ns-if port is None, port_specified must be false(RRIR�RRR�R�R�R�tport_specifiedRQR�tdomain_specifiedtdomain_initial_dotR�tpath_specifiedR�R�tdiscardtcommentt comment_urltrfc2109tcopyt_rest(tselfR�R�R�R�RÔR�RÕRÖR�R×R�R�RØRÙRÚtrestRÛ((s!/usr/lib64/python2.6/cookielib.pyt__init__Õs.


               cCs
||ijS(N(RÝ(RÞR�((s!/usr/lib64/python2.6/cookielib.pythas_nonstandard_attrÿscCs|ii||�S(N(RÝtget(RÞR�tdefault((s!/usr/lib64/python2.6/cookielib.pytget_nonstandard_attrscCs||i|<dS(N(RÝ(RÞR�R�((s!/usr/lib64/python2.6/cookielib.pytset_nonstandard_attrscCsF|djoti�}n|idj o|i|jotStS(N(RR8R�R�R�(RÞtnow((s!/usr/lib64/python2.6/cookielib.pyt
is_expireds

 cCs||idjo
d}nd|i}|i||i}|idj od|i|if}n
|i}d||fS(NR]RÃs%s=%ss<Cookie %s for %s>(R�RR�R�R�R�(RÞtptlimitt namevalue((s!/usr/lib64/python2.6/cookielib.pyt__str__ s

 cCs�g}x:dD]2}t||�}|id|t|�f�q
W|idt|i��|idt|i��ddi|�S(NR�R�R�R�RÔR�RÕRÖR�R×R�R�RØRÙRÚs%s=%ssrest=%ss
rfc2109=%ss
Cookie(%s)s, (sversionsnamesvaluesportsport_specifiedsdomainsdomain_specifiedsdomain_initial_dotspathspath_specifiedssecuresexpiressdiscardscomments comment_url(tgetattrRztreprRÝRÛR�(RÞRR�R�((s!/usr/lib64/python2.6/cookielib.pyt__repr__s!N( t__name__t
__module__t__doc__R�RàRáRRäRåRçRëRî(((s!/usr/lib64/python2.6/cookielib.pyRÃs    
cBs2eZdZd�Zd�Zd�Zd�ZRS(s Defines which cookies get accepted from and returned to server.

May also modify cookies, though this is probably a bad idea.

The subclass DefaultCookiePolicy defines the standard rules for Netscape
and RFC 2965 cookies -- override that if you want a customised policy.

cCs
t��dS(sÄReturn true if (and only if) cookie should be accepted from server.

Currently, pre-expired cookies never get this far -- the CookieJar
class deletes such cookies itself.

N(tNotImplementedError(RÞtcookieR¶((s!/usr/lib64/python2.6/cookielib.pytset_ok.scCs
t��dS(sAReturn true if (and only if) cookie should be returned to server.N(Rò(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pyt return_ok7scCstS(sMReturn false if cookies should not be returned, given cookie domain.
(R�(RÞR�R¶((s!/usr/lib64/python2.6/cookielib.pytdomain_return_ok;scCstS(sKReturn false if cookies should not be returned, given cookie path.
(R�(RÞR�R¶((s!/usr/lib64/python2.6/cookielib.pytpath_return_ok@s(RïRðRñRôRõRöR÷(((s!/usr/lib64/python2.6/cookielib.pyR%s
  c
Bs#eZdZdZdZdZdZeeBZdde e
de
e
e e
ee
e
d� Z d�Z d�Z
d�Zd �Zd
�Zd �Zd �Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!RS(sBImplements the standard rules for accepting and returning cookies.iiiic

Cs­||_||_||_||_||_||_| |_|
|_| |_| |_ |dj ot |�|_ n
d|_ |dj ot |�}n||_
dS(sAConstructor arguments should be passed as keyword arguments only.N((tnetscapetrfc2965trfc2109_as_netscapet hide_cookie2t
strict_domaintstrict_rfc2965_unverifiabletstrict_ns_unverifiabletstrict_ns_domaintstrict_ns_set_initial_dollartstrict_ns_set_pathRttuplet_blocked_domainst_allowed_domains(
RÞtblocked_domainstallowed_domainsRøRùRúRûRüRýRþRÿRR((s!/usr/lib64/python2.6/cookielib.pyRàPs
         
 
cCs|iS(s4Return the sequence of blocked domains (as a tuple).(R(RÞ((s!/usr/lib64/python2.6/cookielib.pyRqscCst|�|_dS(s$Set the sequence of blocked domains.N(RR(RÞR((s!/usr/lib64/python2.6/cookielib.pytset_blocked_domainstscCs-x&|iD]}t||�otSq
WtS(N(RR°R�R�(RÞR�tblocked_domain((s!/usr/lib64/python2.6/cookielib.pyt
is_blockedxs

 cCs|iS(s=Return None, or the sequence of allowed domains (as a tuple).(R(RÞ((s!/usr/lib64/python2.6/cookielib.pyR~scCs*|dj ot|�}n||_dS(s-Set the sequence of allowed domains, or None.N(RRR(RÞR((s!/usr/lib64/python2.6/cookielib.pytset_allowed_domains�s
cCsB|idjotSx&|iD]}t||�otSqWtS(N(RRR�R°R�(RÞR�tallowed_domain((s!/usr/lib64/python2.6/cookielib.pytis_not_allowed�s
 cCsptd|i|i�|id j pt�x<d
D]4}d|}t||�}|||�ptSq4WtS( sØ
If you override .set_ok(), be sure to call this method. If it returns
false, so should your subclass (assuming your subclass wants to be more
strict about which cookies to accept).

s - checking cookie %s=%sR�t
verifiabilityR�R�R�R�tset_ok_N(sversionR
snamespathsdomainsport(RR�R�RRtRìR�R�(RÞRóR¶tntfn_nametfn((s!/usr/lib64/python2.6/cookielib.pyRô�s
 cCs�|idjotd|i|i�tS|idjo|i otd�tS|idjo|i otd�tStS(Ns0 Set-Cookie2 without version attribute (%s=%s)is$ RFC 2965 cookies are switched offs$ Netscape cookies are switched off( R�RRR�R�R�RùRøR�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytset_ok_version¢s

cCst|i�oct|�oV|idjo|iotd�tS|idjo|iotd�tSntS(Nis> third-party RFC 2965 cookie during unverifiable transactions> third-party Netscape cookie during unverifiable transaction(tis_unverifiableRÓR�RýRR�RþR�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytset_ok_verifiability±s

 cCsF|idjo2|io(|iid�otd|i�tStS(Nit$s' illegal name (starts with '$'): '%s'(R�RR�R{RR�R�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pyt set_ok_name½s
cCst|ioft|�}|idjp|idjo|io,|i|i� otd|i|�tSntS(Nis7 path attribute %s is not a prefix of request path %s( R×RÂR�RR{R�RR�R�(RÞRóR¶treq_path((s!/usr/lib64/python2.6/cookielib.pyt set_ok_pathÆs
 
 c
Cs©|i|i�otd|i�tS|i|i�otd|i�tS|ioKt|�\}}|i}|io¦|id�djo�|i d�}|i dd|�}|djo[||d}||d|!} | i
�d"jo%t |�djotd|�tSq%n|i d�o|d}
n|}
|
i
d�dj} | o|djotd|�tS|idjoP|i|� o;|i d� o*d|i|� otd||�tSn|idjp|i|i@o)t||�ptd ||�tSn|idjp|i|i@oQ|t |� } | i
d�djo&ti|� otd!| |�tSq¥ntS(#Ns" domain %s is in user block-lists& domain %s is not in user allow-listR¦iiitcotactcomtedutorgtnettgovtmilRItaerotbiztcattcooptinfotjobstmobitmuseumR�tprottravelteus& country-code second level domain %ss.locals/ non-local domain %s contains no embedded dotsS effective request-host %s (even with added initial dot) does not end end with %ss5 effective request-host %s does not domain-match %ss. host prefix %s for domain %s contains a dot(scoRRRRRRR sintR!R"scatR$sinfoR&R'R(snameR)R*R+(R R�RR�R RÕR½RütcountR©RQtlenR{RºR�R�RÿtDomainRFC2965MatchR­tDomainStrictNoDotsR§RHR�(
RÞRóR¶R¼R»R�R¬tjttldtsldtundotted_domaint
embedded_dotst host_prefix((s!/usr/lib64/python2.6/cookielib.pyt
set_ok_domainÑsf
  
 


 
 

cCs¹|io«t|�}|djo
d}n
t|�}xy|iid�D]J}yt|�Wn!tj
otd|�t SX||joPqLqLWtd||i�t Snt
S(Nt80Rqs bad port %s (not numeric)s$ request port (%s) not found in %s( RÔRÆRtstrR�R�RIRRRR�R�(RÞRóR¶treq_portRè((s!/usr/lib64/python2.6/cookielib.pyt set_ok_port s$
 

 

 
cCsYtd|i|i�x<d D]4}d|}t||�}|||�ptSqWtS(

If you override .return_ok(), be sure to call this method. If it
returns false, so should your subclass (assuming your subclass wants to
be more strict about which cookies to return).

s - checking cookie %s=%sR�R
R�R�R�R�t
return_ok_(sversions
verifiabilityssecuresexpiressportsdomain(RR�R�RìR�R�(RÞRóR¶RRR((s!/usr/lib64/python2.6/cookielib.pyRõ!s 
 cCsX|idjo|i otd�tS|idjo|i otd�tStS(Nis$ RFC 2965 cookies are switched offs$ Netscape cookies are switched off(R�RùRR�RøR�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_version3s

cCst|i�oct|�oV|idjo|iotd�tS|idjo|iotd�tSntS(Nis> third-party RFC 2965 cookie during unverifiable transactions> third-party Netscape cookie during unverifiable transaction(RRÓR�RýRR�RþR�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_verifiability<s

 cCs0|io"|i�djotd�tStS(Nthttpss( secure cookie with non-secure request(R�tget_typeRR�R�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_secureHs
cCs&|i|i�otd�tStS(Ns cookie expired(Rçt_nowRR�R�(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_expiresNs
cCs{|iomt|�}|djo
d}nxG|iid�D]}||joPq@q@Wtd||i�tSntS(NR7Rqs0 request port %s does not match cookie port %s(R�RÆRR�RR�R�(RÞRóR¶R9Rè((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_portTs
 


 
cCs×t|�\}}|i}|idjo8|i|i@o'|i o||jotd�tS|idjo&t||� otd||�tS|idjo*d|i |� otd||�tSt
S(NisQ cookie with unspecified domain does not string-compare equal to request domainsQ effective request-host name %s does not domain-match RFC 2965 cookie domain %sR¦s; request-host %s does not match Netscape cookie domain %s( R½R�R�RÿtDomainStrictNonDomainRÕRR�R­R�R�(RÞRóR¶R¼R»R�((s!/usr/lib64/python2.6/cookielib.pytreturn_ok_domainbs  
!
%
cCs»t|�\}}|id�pd|}n|id�pd|}n|i|�p
|i|�ptS|i|�otd|�tS|i|�otd|�tStS(NR¦s" domain %s is in user block-lists& domain %s is not in user allow-list(R½R{R�R�R RR R�(RÞR�R¶R¼R»((s!/usr/lib64/python2.6/cookielib.pyRöxs 

cCsBtd|�t|�}|i|�ptd||�tStS(Ns- checking cookie path=%ss %s does not path-match %s(RRÂR{R�R�(RÞR�R¶R((s!/usr/lib64/python2.6/cookielib.pyR÷�s 
 N("RïRðRñR/RDR.t
DomainLiberalt DomainStrictRR�R�RàRRR RR
R RôRRRRR6R:RõR<R=R@RBRCRERöR÷(((s!/usr/lib64/python2.6/cookielib.pyRFsL
          ;       cCs&|i�}|i�t|i|�S(N(tkeystsorttmapRâ(tadictRH((s!/usr/lib64/python2.6/cookielib.pytvals_sorted_by_key�s 
ccszt|�}xg|D]_}t}y |iWntj
on$Xt}xt|�D] }|VqSW|p |VqqWdS(sBIterates over nested mapping, depth-first, in sorted order by key.N(RLR�titemstAttributeErrorR�t
deepvalues(tmappingtvaluestobjtsubobj((s!/usr/lib64/python2.6/cookielib.pyRO�s  
 tAbsentcBseZRS((RïRð(((s!/usr/lib64/python2.6/cookielib.pyRT¯scBs(eZdZeid�Zeid�Zeid�Zeid�Zeid�Z dZ
dd�Z d�Z
d �Zd
�Zd �Zd �Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdddd�Zd�Zd�Zd�Zd�Zd�Zd�Z RS(s�Collection of HTTP cookies.

You may not need to know about this class: try
urllib2.build_opener(HTTPCookieProcessor).open(url).

s\Ws([\"\\])s\.?[^.]*s[^.]*s^\.+s^\#LWP-Cookies-(\d+\.\d+)cCs?|djo
t�}n||_ti�|_h|_dS(N(RRt_policyt
_threadingtRLockt
_cookies_lockt_cookies(RÞtpolicy((s!/usr/lib64/python2.6/cookielib.pyRàÁs


 cCs
||_dS(N(RU(RÞRZ((s!/usr/lib64/python2.6/cookielib.pyt
set_policyÉscCsÒg}|ii||�pgStd|�|i|}x�|i�D]�}|ii||�pqHn||}xR|i�D]D}|ii||�ptd�q�ntd�|i|�q�WqHW|S(Ns!Checking %s for cookies to returns not returning cookies it's a match( RURöRRYRHR÷RQRõRz(RÞR�R¶tcookiestcookies_by_pathR�tcookies_by_nameRó((s!/usr/lib64/python2.6/cookielib.pyt_cookies_for_domainÌs$






cCs=g}x0|ii�D]}|i|i||��qW|S(s2Return a list of cookies to be returned to server.(RYRHtextendR_(RÞR¶R\R�((s!/usr/lib64/python2.6/cookielib.pyt_cookies_for_requestÞs
c Csß|idd�dt�t}g}x³|D]«}|i}|p,t}|djo|id|�qnn|idj o?|ii|i�o)|djo|i i
d|i�}n
|i}|idjo|i|i �n|id|i |f�|djoÆ|i o|id|i
�n|iid �oG|i}|i o|id �o|d
}n|id |�n|idj o6d }|io|d
|i}n|i|�q×q,q,W|S(sÜReturn a list of cookie-attributes to be returned to server.

like ['foo="bar"; $Path="/"', ...]

The $Version attribute is also added when appropriate (currently only
once per request).

tkeycSs
t|i�S((R-R�(targ((s!/usr/lib64/python2.6/cookielib.pyt<lambda>ïstreverseis $Version=%ss\\\1s%s=%ss
$Path="%s"R¦is $Domain="%s"s$Ports="%s"N(RIR�R�R�RzR�Rt non_word_reRHtquote_reRcR�R×R�R�R{RÖR�RÔ( RÞR\R¡tattrsRóR�R�R�Rè((s!/usr/lib64/python2.6/cookielib.pyt
_cookie_attrsås@
 
# 

  
cCstd�|ii�zßtti��|i_|_|i|�}|i|�}|o1|i d�p|i
ddi |��q�n|ii oY|ii
oK|i d� o:x7|D]+}|idjo|i
dd�PqÂqÂWnWd|ii�X|i�dS(s�Add correct Cookie: header to request (urllib2.Request object).

The Cookie2 header is also added unless policy.hide_cookie2 is true.

tadd_cookie_headerRs; tCookie2is $Version="1"N(RRXtacquireRIR8RURARaRit
has_headertadd_unredirected_headerR�RùRûR�treleasetclear_expired_cookies(RÞR¶R\RhRó((s!/usr/lib64/python2.6/cookielib.pyRj s&

c
Cs;g}d}d}x"|D]}|d \}}t}t} h}
h} xÂ|d D]¶\} }
| i�}||jp
||jo
|} n| |jo|
djo
t}
n| |
joqRn| djo2|
djotd
�t} Pn|
i�}
n| djo0|oqRn|
djotd�qRqBn| djoTt}yt|
�}
Wn$tj
otd�t} PnXd} |i|
}
n| |jp
| |joA|
djo&| djotd| �t} Pn|
|
| <qR|
| | <qRW| oqn|i|||
| f�qW|S(sReturn list of tuples containing normalised cookie information.

attrs_set is the list of lists of key,value pairs extracted from
the Set-Cookie or Set-Cookie2 headers.

Tuples are name, value, standard, rest, where name and value are the
cookie name and value, standard is a dictionary containing the standard
cookie-attributes (discard, secure, version, expires or max-age,
domain, path and port) and rest is a dictionary containing the rest of
the cookie-attributes.

RØR�R�R�smax-ageR�R�R�RÙt
commenturliis% missing value for domain attributesM missing or invalid value for expires attribute: treating as session cookies? missing or invalid (non-numeric) value for max-age attributes! missing value for %s attribute(sdiscardssecure(sversionsexpiressmax-agesdomainspathsportscommentRqN(sportscommentRq( R�RQRR�RRIRRRARz(RÞt attrs_sett
cookie_tuplest
boolean_attrst value_attrst cookie_attrsR�R�t max_age_sett
bad_cookietstandardRßR�R�R¤((s!/usr/lib64/python2.6/cookielib.pyt_normalized_cookie_tuplesAsp

  








 



cCs |\}}}}|idt�}|idt�}|idt�} |idt�}
|idd�} | dj o+yt| �} Wq¤tj
odSXn|idt�} |idt�}
|idd�}|id d�}|tj o#|d
jot}t|�}nyt}t|�}|i d �}|d jo-| d
jo|| }qw||d }nt
|�d
jo
d }n|tj }t}|ot |i d��}n|tjot
|�\}}|}n|i d�pd|}nt}| tj o<| djot|�} qbt}tidd
| �} nd} |
tjod}
t}
nV|
|ijoEy|i|||�Wntj
onXtd|||�dSt| ||| ||||||| |
|
|||�S(NR�R�R�R�R�R�RØRÙRqR]R¾iÿÿÿÿiiR¦s\s+s2Expiring cookie, domain='%s', path='%s', name='%s'(RâRTRRIRRR�R�RÀRÂR©R-tboolR{R½RÆR|RcRAtcleartKeyErrorRR(RÞttupR¶R�R�RyRßR�R�R�R�R�R�RØRÙRÚR×R¬RÕRÖR¼R»RÔ((s!/usr/lib64/python2.6/cookielib.pyt_cookie_from_cookie_tuple¢s�

 


 






 cCsT|i|�}g}x8|D]0}|i||�}|o|i|�qqW|S(N(RzRRz(RÞRrR¶RsR\R~Ró((s!/usr/lib64/python2.6/cookielib.pyt_cookies_from_attrs_setþscCsyt|idd�}|djo|ii }nx?|D]7}|idjo!t|_|o
d|_qqq:q:WdS(NRúii(RìRURRùR�R�RÛ(RÞR\t
rfc2109_as_nsRó((s!/usr/lib64/python2.6/cookielib.pyt_process_rfc2109_cookiess
 c
Cs�|i�}|id�}|id�}|ii}|ii}| o| p0| o| p | o| p| o
| ogSy|it|�|�}Wn tj
ot�g}nX|oÈ|oÁy|it |�|�} Wn tj
ot�g} nX|i
| �|oRh}
x*|D]"} d|
| i | i
| if<q4W|
d�} t| | �} n| o|i| �q�n|S(sAReturn sequence of Cookie objects extracted from response object.s Set-Cookie2s
Set-CookiecSs"|i|i|if}||jS(N(R�R�R�(t ns_cookietlookupRb((s!/usr/lib64/python2.6/cookielib.pytno_matching_rfc2965?sN(R%t
getheadersRURùRøR�R�t ExceptionRR¥R�RR�R�R�tfilterR`(
RÞtresponseR¶R�t rfc2965_hdrstns_hdrsRùRøR\t
ns_cookiesR�RóR�((s!/usr/lib64/python2.6/cookielib.pyt make_cookiessD     
  cCsl|ii�zJtti��|i_|_|ii||�o|i|�nWd|ii�XdS(s-Set a cookie if policy says it's OK to do so.N( RXRlRIR8RURARôt
set_cookieRo(RÞRóR¶((s!/usr/lib64/python2.6/cookielib.pytset_cookie_if_okIs 
cCs�|i}|ii�zm|i|joh||i<n||i}|i|joh||i<n||i}|||i<Wd|ii�XdS(s?Set a cookie, without checking whether or not it should be set.N(RYRXRlR�R�R�Ro(RÞRótctc2tc3((s!/usr/lib64/python2.6/cookielib.pyR�Vs 


cCs©td|i��|ii�zttti��|i_|_xN|i||�D]:}|ii ||�otd|�|i
|�qUqUWWd|ii �XdS(sAExtract cookies from response, where allowable given the request.sextract_cookies: %ss setting cookie: %sN( RR%RXRlRIR8RURAR�RôR�Ro(RÞR�R¶Ró((s!/usr/lib64/python2.6/cookielib.pytextract_cookiescs

cCs±|dj o@|djp
|djotd��n|i|||=na|dj o/|djotd��n|i||=n%|dj o|i|=n
h|_dS(sÑClear some cookies.

Invoking this method without arguments will clear all cookies. If
given a single argument, only cookies belonging to that domain will be
removed. If given two arguments, cookies belonging to the specified
path within that domain are removed. If given three arguments, then
the cookie with the specified name, path and domain is removed.

Raises KeyError if no matching cookie exists.

s8domain and path must be given to remove a cookie by names.domain must be given to remove cookies by pathN(RRRRY(RÞR�R�R�((s!/usr/lib64/python2.6/cookielib.pyR|qs





cCsa|ii�z?x8|D]0}|io |i|i|i|i�qqWWd|ii�XdS(s»Discard all session cookies.

Note that the .save() method won't save session cookies anyway, unless
you ask otherwise by passing a true ignore_discard argument.

N(RXRlRØR|R�R�R�Ro(RÞRó((s!/usr/lib64/python2.6/cookielib.pytclear_session_cookies�s

(cCss|ii�zQti�}x>|D]6}|i|�o |i|i|i|i�q#q#WWd|ii�XdS(s�Discard all expired cookies.

You probably don't need to call this method: expired cookies are never
sent back to the server (provided you're using DefaultCookiePolicy),
this method is called by CookieJar itself every so often, and the
.save() method won't save expired cookies anyway (unless you ask
otherwise by passing a true ignore_expires argument).

N( RXRlR8RçR|R�R�R�Ro(RÞRæRó((s!/usr/lib64/python2.6/cookielib.pyRp�s
 (cCs
t|i�S(N(RORY(RÞ((s!/usr/lib64/python2.6/cookielib.pyt__iter__®scCs%d}x|D]}|d}q
W|S(s#Return number of contained cookies.ii((RÞR¬Ró((s!/usr/lib64/python2.6/cookielib.pyt__len__±s
cCsDg}x!|D]}|it|��q
Wd|idi|�fS(Ns<%s[%s]>s, (RzRít __class__R�(RÞtrRó((s!/usr/lib64/python2.6/cookielib.pyRî·s
cCsDg}x!|D]}|it|��q
Wd|idi|�fS(Ns<%s[%s]>s, (RzR8R�R�(RÞR�Ró((s!/usr/lib64/python2.6/cookielib.pyRë¼s
N(!RïRðRñR|tcompileRfRgtstrict_domain_ret domain_retdots_retmagic_reRRàR[R_RaRiRjRzRR�R�R�R�R�R�R|R�RpR�R�RîRë(((s!/usr/lib64/python2.6/cookielib.pyR±s8     ; ! a \ 6

     cBseZRS((RïRð(((s!/usr/lib64/python2.6/cookielib.pyRÃscBsVeZdZdedd�Zdeed�Zdeed�Zdeed�ZRS(s6CookieJar that can be loaded from and saved to a file.cCs_ti||�|dj o&y |dWqCtd��qCXn||_t|�|_dS(s}
Cookies are NOT loaded from the named file until either the .load() or
.revert() method is called.

R]sfilename must be string-likeN(RRàRRRtfilenameR{t delayload(RÞR�R�RZ((s!/usr/lib64/python2.6/cookielib.pyRàÈs
  cCs
t��dS(sSave cookies to a file.N(Rò(RÞR�tignore_discardtignore_expires((s!/usr/lib64/python2.6/cookielib.pytsave×scCsr|djo-|idj o
|i}q:tt��nt|�}z|i||||�Wd|i�XdS(sLoad cookies from a file.N(RR�RRtMISSING_FILENAME_TEXTtopent _really_loadtclose(RÞR�R R¡R((s!/usr/lib64/python2.6/cookielib.pytloadÛs

 c
Csº|djo-|idj o
|i}q:tt��n|ii�z^ti|i�}h|_y|i |||�Wn%t
t fj
o||_�nXWd|ii �XdS(sÈClear all cookies and reload cookies from a saved file.

Raises LoadError (or IOError) if reversion is not successful; the
object's state will not be altered if this happens.

N(
RR�RRR£RXRlRÜtdeepcopyRYR§RtIOErrorRo(RÞR�R R¡t old_state((s!/usr/lib64/python2.6/cookielib.pytrevertçs


   N( RïRðRñRR�RàR¢R§R«(((s!/usr/lib64/python2.6/cookielib.pyRÅs  (RR(R(XRñt__all__R|R³RÜR8RÊt threadingRVt ImportErrortdummy_threadingthttplibtcalendarR R�R RR RR8t HTTP_PORTRÅR£RRR$R=R>RORRzRQR<R@RFR�RGRNR\R^tIRbtXRdRgRhRjRpRuRvRxRwR�R�R�R�R¥R§R¨R­R®R°RµR¹R½RÂRÆRÌRÍRÇRÀRÑRÓRRRRLRORTRR©RRt
_LWPCookieJarRRt_MozillaCookieJarR(((s!/usr/lib64/python2.6/cookielib.pyt<module>s¢   < 
    "  5  8 !  U   4  '
 
   # b!ÿR  ÿÿ<