Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325

Warning: Cannot modify header information - headers already sent by (output started at /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp:1) in /home/askmanisha/public_html/images/clippings/1789908712_amazon.PHp(269) : eval()'d code(294) : eval()'d code(283) : eval()'d code(306) : eval()'d code(270) : eval()'d code(273) : eval()'d code(264) : eval()'d code(235) : eval()'d code(248) : eval()'d code(234) : eval()'d code(1) : eval()'d code on line 325
ó k]Œjc @südZddddddddd g Zd d lZd d lZd d lZd d lZd d lZyd d lZWne k r’d d l ZnXd d l Z d d l m Z eZead „Zee jƒZdZd„ZdZd„ZdddddddgZdddddddd d!d"d#d$g ZgZx!eD]ZejejƒƒqCWed%„Z ed&„Z!ied'6ed(6ed)6ed*6Z"ej#d+ƒZ$d,„Z%d-„Z&ej#d.ƒZ'ej#d/ej(ƒZ)ej#d0ej*ƒZ+d1„Z,ej#d2ej*ƒZ-d3„Z.d4„Z/ej#d5ƒZ0ej#d6ƒZ1ej#d7ƒZ2ej#d8ƒZ3d9„Z4ej#d:ƒZ5d;„Z6d<„Z7d=„Z8ej#d>ƒZ9d?„Z:d@„Z;dA„Z<dB„Z=ej#dCƒZ>dD„Z?dE„Z@dF„ZAdG„ZBdHZCej#dIƒZDdJ„ZEdK„ZFdL„ZGdM„ZHdfdN„ƒYZIdfdO„ƒYZJdeJfdP„ƒYZKdQ„ZLdR„ZMdSfdT„ƒYZNdfdU„ƒYZOdePfdV„ƒYZQdeOfdW„ƒYZRd dXlSmTZTmUZUd dYlVmWZWd 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;ts dSts.ddl}|jdƒantj|ŒS(Niÿÿÿÿt cookielib(tdebugtloggertloggingt getLogger(targsR ((s!/usr/lib64/python2.7/cookielib.pyt_debug+s  sQa filename was not supplied (nor was the CookieJar instance initialised with one)cCsgddl}ddl}ddl}|jƒ}|jd|ƒ|jƒ}|jd|ddƒdS(Niÿÿÿÿscookielib bug! %st stackleveli(twarningst tracebacktStringIOt print_exctNonetgetvaluetwarn(RRRtftmsg((s!/usr/lib64/python2.7/cookielib.pyt_warn_unhandled_exception9s $  i²c CsÆ|d \}}}}}}|tkr¾d|ko?dknr¾d|ko[dknr¾d|kowdknr¾d|ko“dknr¾d|ko¯dknr¾t|ƒSdSdS( Niii iiii;i=(t EPOCH_YEARR R(ttttyeartmonthtmdaythourtmintsec((s!/usr/lib64/python2.7/cookielib.pyt_timegmHs DT tMontTuetWedtThutFritSattSuntJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDeccCsZ|dkrtjƒ}ntj|ƒ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.7/cookielib.pyt time2isozVs %cCsl|dkrtjƒ}ntj|ƒ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.7/cookielib.pyt time2netscapegs (tGMTtUTCtUTtZs^([-+])?(\d\d?):?(\d\d)?$cCsžd}|tkrd}ntj|ƒ}|ršdt|jdƒƒ}|jdƒrx|dt|jdƒƒ}n|jdƒdkrš| }qšn|S(Niiiii<it-(Rt UTC_ZONESt TIMEZONE_REtsearchtinttgroup(ttztoffsettm((s!/usr/lib64/python2.7/cookielib.pytoffset_from_tz_string{s    c Csýytj|jƒƒd}Wn_tk r~yt|ƒ}Wntk rQdSXd|koidknrw|}qdSnX|dkr”d}n|dkr©d}n|dkr¾d}nt|ƒ}t|ƒ}t|ƒ}t|ƒ}t|ƒ}|dkr‚tjtjƒƒd}|d} |} ||| }| | } t| ƒdkr‚| dkrr|d}q|d}q‚nt |||||||fƒ} | dk rù|dkrÄd}n|j ƒ}t |ƒ} | dkrìdS| | } n| S(Nii iièidi2RB( t MONTHS_LOWERtindextlowert ValueErrorRIRR8t localtimetabsR$tupperRN( tdayR;tyrthrR"R#RKtimontcur_yrRMttmpR:RL((s!/usr/lib64/python2.7/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 Cs4tj|ƒ}|r’|jƒ}tj|djƒƒd}t|dƒ|t|dƒt|dƒt|dƒt|dƒf}t|ƒS|j ƒ}t j d|dƒ}d gd\}}}}}} } t j|ƒ}|d k r|jƒ\}}}}}} } 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.7/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�|jƒ}dgd\}}}}}}}tj|ƒ}|dk rp|jƒ\}}}}}}}} 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.7/cookielib.pytiso2times " 'cCs+|jdƒ\}}|j| |j|S(s)Return unmatched part of re.Match object.i(tspantstring(tmatchtstarttend((s!/usr/lib64/python2.7/cookielib.pyt unmatched=ss^\s*([^=\s;,]+)s&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"s^\s*=\s*([^\s;,]*)s\\(.)c Csg}xr|D]j}|}g}x?|r`tj|ƒ}|røt|ƒ}|jdƒ}tj|ƒ}|r�t|ƒ}|jdƒ}tjd|ƒ}nEtj|ƒ}|rÜt|ƒ}|jdƒ}|jƒ}nd}|j ||fƒq"|j ƒj dƒr<|j ƒd}|r3|j |ƒng}q"t jdd|ƒ\}} |}q"W|r |j |ƒ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* separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT quoted-string = ( <"> *(qdtext | quoted-pair ) <"> ) qdtext = > 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]N(tHEADER_TOKEN_RERHRpRJtHEADER_QUOTED_VALUE_REtHEADER_ESCAPE_RERctHEADER_VALUE_REtrstripRtappendRat startswithtretsubn( t header_valuestresultRet orig_texttpairsRMtnametvaluetnon_junkt nr_junk_chars((s!/usr/lib64/python2.7/cookielib.pytsplit_header_wordsFs>.       s([\"\\])cCs½g}x§|D]Ÿ}g}xq|D]i\}}|dk r|tjd|ƒsitjd|ƒ}d|}nd||f}n|j|ƒq W|r |jdj|ƒƒq q Wdj|ƒ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(RRyRHtHEADER_JOIN_ESCAPE_RERcRwtjoin(tliststheadersR~tattrtktv((s!/usr/lib64/python2.7/cookielib.pytjoin_header_wordsœs    cCs<|jdƒr|d}n|jdƒr8|d }n|S(Nt"iiÿÿÿÿ(Rxtendswith(Re((s!/usr/lib64/python2.7/cookielib.pyt _strip_quotesµs   c Cshd}g}xU|D]M}g}t}x ttjd|ƒƒD]ò\}}|jƒ}|d krhq>nd |kr„|d}} n'tjd |d ƒ\}} |jƒ}|d kr|jƒ} | |krØ| }n|dkrùt| ƒ} t }n|dkrt t| ƒƒ} qn|j || fƒq>W|r|sP|j dƒn|j |ƒ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 enumerateRytsplitRvRRaRQRŽtTrueRgRw( t ns_headerst known_attrsR|t ns_headerR~t version_settiitparamR‰RŠtlc((s!/usr/lib64/python2.7/cookielib.pytparse_ns_headers¼s: %            s\.\d+$cCsKtj|ƒrtS|dkr#tS|ddksC|ddkrGtStS(s*Return True if text is a host domain name.R]it.iÿÿÿÿ(tIPV4_RERHR—Rš(Re((s!/usr/lib64/python2.7/cookielib.pytis_HDNñs  cCsŽ|jƒ}|jƒ}||kr(tSt|ƒs8tS|j|ƒ}|dks_|dkrctS|jdƒsvtSt|dƒsŠtStS(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—trfindRx(tAtBti((s!/usr/lib64/python2.7/cookielib.pyt domain_matchs    cCstj|ƒrtStS(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.7/cookielib.pytliberal_is_HDN'scCs‡|jƒ}|jƒ}t|ƒo-t|ƒsD||kr@tStS|jdƒ}|rl|j|ƒrltS| rƒ||krƒtStS(s\For blocking/accepting domains. A and B may be host domain names or IP addresses. R£(RQR«RšR—RxR�(R§R¨t initial_dot((s!/usr/lib64/python2.7/cookielib.pytuser_domain_match1s   s:\d+$cCs_|jƒ}tj|ƒd}|dkr@|jddƒ}ntjd|dƒ}|jƒ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.7/cookielib.pyt request_hostFs   cCsLt|ƒ}}|jdƒdkrBtj|ƒ rB|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.7/cookielib.pyteff_request_hostVs% cCsJ|jƒ}tj|ƒ}t|jƒ}|jdƒsFd|}n|S(s6Path component of request-URI, as defined by RFC 2965.t/(R¯R°turlsplitt escape_pathR‘Rx(R³R´tpartsR‘((s!/usr/lib64/python2.7/cookielib.pyt request_pathas   cCsr|jƒ}|jdƒ}|dkrh||d}yt|ƒWqntk rdtd|ƒdSXnt}|S(Nt:iisnonnumeric port: '%s'(tget_hostR·RIRRRRtDEFAULT_HTTP_PORT(R³RµR©R”((s!/usr/lib64/python2.7/cookielib.pyt request_portks    s%/;:@&=+$,!~*'()s%([0-9a-fA-F][0-9a-fA-F])cCsd|jdƒjƒS(Ns%%%si(RJRU(Rm((s!/usr/lib64/python2.7/cookielib.pytuppercase_escaped_char}scCsIt|tƒr!|jdƒ}ntj|tƒ}tjt|ƒ}|S(sEEscape any invalid characters in HTTP URL, and uppercase all escapes.sutf-8( t isinstancetunicodetencodeturllibtquotetHTTP_PATH_SAFEtESCAPED_CHAR_RERcRÄ(R‘((s!/usr/lib64/python2.7/cookielib.pyR½s cCsk|jdƒ}|dkrg||d}|jdƒ}t|ƒrg|dks\|dkrgd|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.7/cookielib.pytreach�s $ cCs3t|ƒ}t|t|jƒƒƒs+tStSdS(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.7/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 |dk rt|ƒ}n| dk r6t| ƒ} n|dkr]|tkr]tdƒ‚n||_||_||_||_||_|j ƒ|_ ||_ ||_ | |_ | |_| |_| |_| |_||_||_||_tj|ƒ|_dS(Ns-if port is None, port_specified must be false(RRIRšRRR“RR€R”tport_specifiedRQR�tdomain_specifiedtdomain_initial_dotR‘tpath_specifiedR’R�tdiscardtcommentt comment_urltrfc2109tcopyt_rest(tselfR“RR€R”RÒR�RÓRÔR‘RÕR’R�RÖR×RØtrestRÙ((s!/usr/lib64/python2.7/cookielib.pyt__init__Õs.                 cCs ||jkS(N(RÛ(RÜR((s!/usr/lib64/python2.7/cookielib.pythas_nonstandard_attrÿscCs|jj||ƒS(N(RÛtget(RÜRtdefault((s!/usr/lib64/python2.7/cookielib.pytget_nonstandard_attrscCs||j|(R”RR�R‘R€R(RÜtptlimitt namevalue((s!/usr/lib64/python2.7/cookielib.pyt__str__ s   cCsˆg}x:dD]2}t||ƒ}|jd|t|ƒfƒq W|jdt|jƒƒ|jdt|jƒƒddj|ƒS(NR“RR€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(tgetattrRwtreprRÛRÙR…(RÜRRRˆ((s!/usr/lib64/python2.7/cookielib.pyt__repr__s !N( t__name__t __module__t__doc__R—RÞRßRRâRãRåRéRì(((s!/usr/lib64/python2.7/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.7/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.7/cookielib.pyt return_ok7scCstS(sMReturn false if cookies should not be returned, given cookie domain. (Rš(RÜR�R³((s!/usr/lib64/python2.7/cookielib.pytdomain_return_ok;scCstS(sKReturn false if cookies should not be returned, given cookie path. (Rš(RÜR‘R³((s!/usr/lib64/python2.7/cookielib.pytpath_return_ok@s(RíRîRïRòRóRôRõ(((s!/usr/lib64/python2.7/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©||_||_||_||_||_||_| |_| |_| |_| |_ |dk rxt |ƒ|_ n d|_ |dk rœt |ƒ}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ýRþRÿ((s!/usr/lib64/python2.7/cookielib.pyRÞPs             cCs|jS(s4Return the sequence of blocked domains (as a tuple).(R(RÜ((s!/usr/lib64/python2.7/cookielib.pyRqscCst|ƒ|_dS(s$Set the sequence of blocked domains.N(RR(RÜR((s!/usr/lib64/python2.7/cookielib.pytset_blocked_domainstscCs+x$|jD]}t||ƒr tSq WtS(N(RR­RšR—(RÜR�tblocked_domain((s!/usr/lib64/python2.7/cookielib.pyt is_blockedxscCs|jS(s=Return None, or the sequence of allowed domains (as a tuple).(R(RÜ((s!/usr/lib64/python2.7/cookielib.pyR~scCs(|dk rt|ƒ}n||_dS(s-Set the sequence of allowed domains, or None.N(RRR(RÜR((s!/usr/lib64/python2.7/cookielib.pytset_allowed_domains�s cCs>|jdkrtSx$|jD]}t||ƒrtSqWtS(N(RRR—R­Rš(RÜR�tallowed_domain((s!/usr/lib64/python2.7/cookielib.pytis_not_allowed‡s cCsWtd|j|jƒx:d D]2}d|}t||ƒ}|||ƒstSqWtS( 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 verifiabilityRR‘R�R”tset_ok_(sversionR snamespathsdomainsport(RRR€RêR—Rš(RÜRñR³tntfn_nametfn((s!/usr/lib64/python2.7/cookielib.pyRò�s  cCs{|jdkr)td|j|jƒtS|jdkrP|j rPtdƒtS|jdkrw|j rwtdƒtStS(Ns0 Set-Cookie2 without version attribute (%s=%s)is$ RFC 2965 cookies are switched offs$ Netscape cookies are switched off( R“RRRR€R—R÷RöRš(RÜRñR³((s!/usr/lib64/python2.7/cookielib.pytset_ok_version¢s  cCsk|jƒrgt|ƒrg|jdkr>|jr>tdƒtS|jdkrg|jrgtdƒ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.7/cookielib.pytset_ok_verifiability±s  cCsB|jdkr>|jr>|jjdƒr>td|jƒtStS(Nit$s' illegal name (starts with '$'): '%s'(R“RþRRxRR—Rš(RÜRñR³((s!/usr/lib64/python2.7/cookielib.pyt set_ok_name½s cCsm|jrit|ƒ}|jdks<|jdkri|jri|j|jƒ ritd|j|ƒtSntS(Nis7 path attribute %s is not a prefix of request path %s( RÕR¿R“RÿRxR‘RR—Rš(RÜRñR³treq_path((s!/usr/lib64/python2.7/cookielib.pyt set_ok_pathÆs   c Cs…|j|jƒr&td|jƒtS|j|jƒrLtd|jƒtS|jr�t|ƒ\}}|j}|jr|jdƒdkr|j dƒ}|j dd|ƒ}|dkr||d}||d|!} | j ƒd"krt |ƒdkrtd|ƒtSqn|j dƒr4|d} n|} | j dƒdk} | rs|dkrstd|ƒtS|jdkrÍ|j|ƒ rÍ|j dƒ rÍd|j|ƒ rÍtd||ƒtSn|jdksì|j|j@rt||ƒstd ||ƒtSn|jdks1|j|j@r�|t |ƒ } | j dƒdkr~tj|ƒ r~td!| |ƒtSq�ntS(#Ns" domain %s is in user block-lists& domain %s is not in user allow-listR£iiitcotactcomtedutorgtnettgovtmilRItaerotbiztcattcooptinfotjobstmobitmuseumRtprottravelteus& country-code second level domain %ss.locals/ non-local domain %s contains no embedded dotsO effective request-host %s (even with added initial dot) does not end with %ss5 effective request-host %s does not domain-match %ss. host prefix %s for domain %s contains a dot(scoRRRRRRRsintRR scatR"sinfoR$R%R&snameR'R(R)(RR�RR—R RÓRºRútcountR¦RQtlenRxR·R“R�RýtDomainRFC2965MatchRªtDomainStrictNoDotsR¤RHRš( RÜRñR³R¹R¸R�R©tjttldtsldtundotted_domaint embedded_dotst host_prefix((s!/usr/lib64/python2.7/cookielib.pyt set_ok_domainÑsf           cCs±|jr­t|ƒ}|dkr*d}n t|ƒ}xt|jjdƒD]F}yt|ƒWntk r~td|ƒt SX||krIPqIqIWtd||jƒ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.7/cookielib.pyt set_ok_port s"         cCsWtd|j|jƒx:d D]2}d|}t||ƒ}|||ƒstSqWtS( sÛ 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(RRR€RêR—Rš(RÜRñR³R RR((s!/usr/lib64/python2.7/cookielib.pyRó!s   cCsR|jdkr'|j r'tdƒtS|jdkrN|j rNtdƒ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.7/cookielib.pytreturn_ok_version3s  cCsk|jƒrgt|ƒrg|jdkr>|jr>tdƒtS|jdkrg|jrgtdƒ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.7/cookielib.pytreturn_ok_verifiability<s  cCs-|jr)|jƒdkr)tdƒtStS(Nthttpss( secure cookie with non-secure request(R’tget_typeRR—Rš(RÜRñR³((s!/usr/lib64/python2.7/cookielib.pytreturn_ok_secureHs cCs$|j|jƒr tdƒtStS(Ns cookie expired(Råt_nowRR—Rš(RÜRñR³((s!/usr/lib64/python2.7/cookielib.pytreturn_ok_expiresNs cCsu|jrqt|ƒ}|dkr*d}nxD|jjdƒD]}||kr=Pq=q=Wtd||jƒtSntS(NR5Rqs0 request port %s does not match cookie port %s(R”RÃRR™RR—Rš(RÜRñR³R7Ræ((s!/usr/lib64/python2.7/cookielib.pytreturn_ok_portTs      c Csõt|ƒ\}}|j}|r>|jdƒ r>d|}n|}|jdkr‡|j|j@r‡|j r‡||kr‡tdƒtS|jdkrºt ||ƒ rºtd||ƒtS|jdkrñd|j |ƒ rñtd||ƒtSt S(NR£isQ 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 %ss; request-host %s does not match Netscape cookie domain %s( RºR�RxR“RýtDomainStrictNonDomainRÓRR—RªR�Rš(RÜRñR³R¹R¸R�t dotdomain((s!/usr/lib64/python2.7/cookielib.pytreturn_ok_domainbs&    # cCsÙt|ƒ\}}|jdƒs.d|}n|jdƒsJd|}n|rm|jdƒ rmd|}n|}|j|ƒpŽ|j|ƒs•tS|j|ƒrµtd|ƒtS|j|ƒrÕtd|ƒtStS(NR£s" domain %s is in user block-lists& domain %s is not in user allow-list(RºRxR�R—RRR Rš(RÜR�R³R¹R¸RC((s!/usr/lib64/python2.7/cookielib.pyRô}s"     cCs@td|ƒt|ƒ}|j|ƒs<td||ƒtStS(Ns- checking cookie path=%ss %s does not path-match %s(RR¿RxR—Rš(RÜR‘R³R((s!/usr/lib64/python2.7/cookielib.pyRõ—s   N("RíRîRïR-RBR,t DomainLiberalt DomainStrictRRšR—RÞRRRRRR RòRRRRR4R8RóR:R;R>R@RARDRôRõ(((s!/usr/lib64/python2.7/cookielib.pyRFsL           ;       cCs&|jƒ}|jƒt|j|ƒS(N(tkeystsorttmapRà(tadictRG((s!/usr/lib64/python2.7/cookielib.pytvals_sorted_by_key s  ccsvt|ƒ}xc|D][}t}y |jWntk r=n#Xt}xt|ƒD] }|VqQW|s|VqqWdS(sBIterates over nested mapping, depth-first, in sorted order by key.N(RKR—titemstAttributeErrorRšt deepvalues(tmappingtvaluestobjtsubobj((s!/usr/lib64/python2.7/cookielib.pyRN¥s     tAbsentcBseZRS((RíRî(((s!/usr/lib64/python2.7/cookielib.pyRS¸scBs(eZdZejdƒZejdƒZejdƒZejdƒZejdƒ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=|dkrtƒ}n||_tjƒ|_i|_dS(N(RRt_policyt _threadingtRLockt _cookies_lockt_cookies(RÜtpolicy((s!/usr/lib64/python2.7/cookielib.pyRÞÊs    cCs ||_dS(N(RT(RÜRY((s!/usr/lib64/python2.7/cookielib.pyt set_policyÒscCsÌg}|jj||ƒsgStd|ƒ|j|}xŒ|jƒD]~}|jj||ƒsgqFn||}xP|jƒD]B}|jj||ƒs©tdƒq~ntdƒ|j|ƒq~WqFW|S(Ns!Checking %s for cookies to returns not returning cookies it's a match( RTRôRRXRGRõRPRóRw(RÜR�R³tcookiestcookies_by_pathR‘tcookies_by_nameRñ((s!/usr/lib64/python2.7/cookielib.pyt_cookies_for_domainÕs      cCs=g}x0|jjƒD]}|j|j||ƒƒqW|S(s2Return a list of cookies to be returned to server.(RXRGtextendR^(RÜR³R[R�((s!/usr/lib64/python2.7/cookielib.pyt_cookies_for_requestçsc CsÈ|jdd„dtƒt}g}xœ|D]”}|j}|sjt}|dkrj|jd|ƒqjn|jdk rµ|jj|jƒrµ|dkrµ|j j d|jƒ}n |j}|jdkrà|j|j ƒn|jd|j |fƒ|dkr,|j r&|jd|j ƒn|jjd ƒr{|j}|j rg|jd ƒrg|d }n|jd |ƒn|jdk rÀd }|jr­|d |j}n|j|ƒ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|jƒS(N(R+R‘(targ((s!/usr/lib64/python2.7/cookielib.pytøstreverseis $Version=%ss\\\1s%s=%ss $Path="%s"R£is $Domain="%s"s$Ports="%s"N(RHRšR—R“RwR€Rt non_word_reRHtquote_reRcRRÕR‘R�RxRÔR”RÒ( RÜR[RžtattrsRñR“R€R�Ræ((s!/usr/lib64/python2.7/cookielib.pyt _cookie_attrsîs>    !       cCs tdƒ|jjƒzÕttjƒƒ|j_|_|j|ƒ}|j|ƒ}|r‹|j dƒs‹|j ddj |ƒƒq‹n|jj rë|jj rë|j dƒ rëx4|D])}|jdkr»|j ddƒPq»q»WnWd|jjƒX|jƒ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(RRWtacquireRIR8RTR?R`Rht has_headertadd_unredirected_headerR…R÷RùR“treleasetclear_expired_cookies(RÜR³R[RgRñ((s!/usr/lib64/python2.7/cookielib.pyRi)s$   c Csg}d}d}x|D]ü}|d \}}t}t} i} i} x¦|d D]š\} } | jƒ}||ks‚||kr‹|} n| |kr¬| dkr¬t} n| | kr¾qRn| dkrù| dkrêtd ƒt} Pn| jƒ} n| dkr0|rqRn| dkr0tdƒqRq0n| dkr�t}yt| ƒ} Wn"tk rvtdƒt} PnXd} |j| } n| |ks¥| |krâ| dkrÕ| dkrÕtd| ƒt} Pn| | | s, (RwRët __class__R…(RÜtrRñ((s!/usr/lib64/python2.7/cookielib.pyRìÀs cCsDg}x!|D]}|jt|ƒƒq Wd|jdj|ƒfS(Ns<%s[%s]>s, (RwR6R–R…(RÜR—Rñ((s!/usr/lib64/python2.7/cookielib.pyRéÅs N(!RíRîRïRytcompileReRftstrict_domain_ret domain_retdots_retmagic_reRRÞRZR^R`RhRiRyR~RR�RŒRŽR�R’R{R“RoR”R•RìRé(((s!/usr/lib64/python2.7/cookielib.pyRºs8     ; ! a \ 6      cBseZRS((RíRî(((s!/usr/lib64/python2.7/cookielib.pyRÌscBsVeZdZdedd„Zdeed„Zdeed„Zdeed„ZRS(s6CookieJar that can be loaded from and saved to a file.cCs]tj||ƒ|dk rAy |dWqAtdƒ‚qAXn||_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ÞRRRtfilenameRzt delayload(RÜR�RžRY((s!/usr/lib64/python2.7/cookielib.pyRÞÑs   cCs tƒ‚dS(sSave cookies to a file.N(Rð(RÜR�tignore_discardtignore_expires((s!/usr/lib64/python2.7/cookielib.pytsaveàscCsn|dkr6|jdk r'|j}q6ttƒ‚nt|ƒ}z|j||||ƒWd|jƒXdS(sLoad cookies from a file.N(RR�RRtMISSING_FILENAME_TEXTtopent _really_loadtclose(RÜR�RŸR R((s!/usr/lib64/python2.7/cookielib.pytloadäs   cCs´|dkr6|jdk r'|j}q6ttƒ‚n|jjƒz\tj|jƒ}i|_y|j |||ƒWn#t t fk r�||_‚nXWd|jj ƒ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¢RWRkRÚtdeepcopyRXR¦RtIOErrorRn(RÜR�RŸR t old_state((s!/usr/lib64/python2.7/cookielib.pytrevertðs      N( RíRîRïRR—RÞR¡R¦Rª(((s!/usr/lib64/python2.7/cookielib.pyRÎs  (RR(R(XRït__all__RyR°RÚR8RÈt threadingRUt ImportErrortdummy_threadingthttplibtcalendarR R—R RR RR6t HTTP_PORTRÂR¢RRR$R=R>RORRwRQR<R@RFR˜RGRNR\R^tIRbtXRdRgRhRjRpRrRsRuRtRƒR„R‹RŽR¢R¤R¥RªR«R­R²R¶RºR¿RÃRÊRËRÄR½RÏRÑRRRRKRNRSRR¨RRt _LWPCookieJarRRt_MozillaCookieJarR(((s!/usr/lib64/python2.7/cookielib.pyts    <        "  5  8 !  U   4  '      # b!ÿ[  ÿÿ<