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ÈdZddlmZddlZddlZddlZddlmZddlmZddl Z e j ƒ�-er�e j dde ƒnddl Z WdQXyddlmZWn!ek rØddlmZnXd d d d d ddddddddddddgZdZdZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Z d)Z!d*Z"d+Z#d,Z$d-Z%d.Z&d/Z'd0Z(d1Z)d2Z*d3Z+d4Z,d5Z-d6Z.d7Z/d8Z0d9Z1d:Z2d;Z3d<Z4d=Z5d>Z6d?Z7d@Z8dAZ9dBZ:dCZ;dDZ<dEZ=dFZ>dGZ?dHZ@dIZAdJZBdKZCdLZDdMZEdNZFdOZGdPZHi)dQd 6dRd!6dSd#6dTd$6dUd%6dVd&6dWd'6dXd(6dYd)6dZd,6d[d-6d\d.6d]d/6d^d06d_d16d`da6dbd26dcd36ddd46ded56dfd66dgd76dhd86did96djd:6dkd;6dld<6dmd=6dnd>6dod?6dpd@6dqdA6drdB6dsdC6dtdD6dudI6dvdJ6dwdK6dxdL6dydM6dzdN6ZId{ZJd|ZKd ZLejMd}ƒjNZOejMd~ƒjPZQejMdƒZRejMd€ƒZSd�e jTfd‚„ƒYZUd fdƒ„ƒYZVd fd„„ƒYZWd fd…„ƒYZXyddlYZYWnek rJnCXd†eWfd‡„ƒYZZej[d†ƒdˆeXfd‰„ƒYZ\dŠ„Z]d e^fd‹„ƒYZ_d e_fdŒ„ƒYZ`de_fd�„ƒYZade_fdŽ„ƒYZbde_fd�„ƒYZcde_fd�„ƒYZdde_fd‘„ƒYZede_fd’„ƒYZfdeffd“„ƒYZgdeffd”„ƒYZhdeffd•„ƒYZide_fd–„ƒYZjd—e_fd˜„ƒYZke_Zld™fdš„ƒYZmdS(›sý HTTP/1.1 client library HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPConnection() v Idle | | putrequest() v Request-started | | ( putheader() )* endheaders() v Request-sent | | response = getresponse() v Unread-response [Response-headers-read] |\____________________ | | | response.read() | putrequest() v v Idle Req-started-unread-response ______/| / | response.read() | | ( putheader() )* endheaders() v v Request-started Req-sent-unread-response | | response.read() v Request-sent This diagram presents the following rules: -- a second request may not be started until {response-headers-read} -- a response [object] cannot be retrieved until {request-sent} -- there is no differentiation between an unread response body and a partially read response body Note: this enforcement is applied by the HTTPConnection class. The HTTPResponse class does not enforce this state machine, which implies sophisticated clients may accelerate the request/response pipeline. Caution should be taken, though: accelerating the states beyond the above pattern may imply knowledge of the server's connection-close behavior for certain requests. For example, it is impossible to tell whether the server will close the connection UNTIL the response headers have been read; this means that further requests cannot be placed into the pipeline until it is known that the server will NOT be closing the connection. Logical State __state __response ------------- ------- ---------- Idle _CS_IDLE None Request-started _CS_REQ_STARTED None Request-sent _CS_REQ_SENT None Unread-response _CS_IDLE Req-started-unread-response _CS_REQ_STARTED Req-sent-unread-response _CS_REQ_SENT iÿÿÿÿ(tarrayN(t py3kwarning(turlsplittignores.*mimetools has been removed(tStringIOtHTTPt HTTPResponsetHTTPConnectiont HTTPExceptiont NotConnectedtUnknownProtocoltUnknownTransferEncodingtUnimplementedFileModetIncompleteReadt InvalidURLtImproperConnectionStatetCannotSendRequesttCannotSendHeadertResponseNotReadyt BadStatusLineterrort responsesiPi»tUNKNOWNtIdlesRequest-starteds Request-sentidieifiÈiÉiÊiËiÌiÍiÎiÏiâi,i-i.i/i0i1i3i�i‘i’i“i”i•i–i—i˜i™iši›iœi�ižiŸi i¡i¦i§i¨iªiôiõiöi÷iøiùiûiþtContinuesSwitching ProtocolstOKtCreatedtAcceptedsNon-Authoritative Informations No Contents Reset ContentsPartial ContentsMultiple ChoicessMoved PermanentlytFounds See Others Not Modifieds Use Proxys(Unused)i2sTemporary Redirects Bad Requestt UnauthorizedsPayment Requiredt Forbiddens Not FoundsMethod Not AllowedsNot AcceptablesProxy Authentication RequiredsRequest TimeouttConflicttGonesLength RequiredsPrecondition FailedsRequest Entity Too LargesRequest-URI Too LongsUnsupported Media TypesRequested Range Not SatisfiablesExpectation FailedsInternal Server ErrorsNot Implementeds Bad GatewaysService UnavailablesGateway TimeoutsHTTP Version Not Supportediis\A[^:\s][^:\r\n]*\Zs\n(?![ \t])|\r(?![ \t\n])s[- -ÿ]s[-]t HTTPMessagecBs#eZd„Zd„Zd„ZRS(cCsT|jj|ƒ}|dkr.||j|RPtclosetLineAndFileWrappertint(R&RIRTR2RU((s/usr/lib64/python2.7/httplib.pyt _read_status›s8       cCs�g}xƒtr‹|jjtdƒ}t|ƒtkrFtdƒ‚n|j|ƒt|ƒtkrxtdtƒ‚n|dkr Pq q W|S(s®Reads potential header lines into a list from a file pointer. Length of line is limited by _MAXLINE, and number of headers is limited by _MAXHEADERS. is header linesgot more than %d headerss s R.(s s R.( R7R4R;R<R8R=R?R9R(R&R1RI((s/usr/lib64/python2.7/httplib.pyt _read_headersÂs   c CsÄ|jdk rdSx[trp|jƒ\}}}|tkrAPn|jƒ}|jdkrjd|fGHn~qW||_|jƒ|_ |dkr¡d|_ n?|j dƒr¼d|_ n$|dkrÔd|_ n t |ƒ‚|j dkr d|_ d|_d |_ttƒƒ|_dSt|jdƒ|_|jdkrfx|jjD]}d G|GqQWnd|j_|jjd ƒ}|r±|jƒd kr±d |_d|_n d|_|jƒ|_|jjd ƒ}|r9|j r9yt|ƒ|_ Wntk rd|_ qBX|j dkrBd|_ qBn d|_ |tks…|tks…d|koqdkns…|jdkr‘d|_ n|j rÀ|j rÀ|j dkrÀd |_ndS(Nisheaders:sHTTP/1.0i sHTTP/1.i sHTTP/0.9i isheader:stransfer-encodingRVscontent-lengthidiÈtHEAD(RRR$R7RdtCONTINUEReROR2R@RURTR>R RXRVRYR!RR4R1t getheadertlowerRWt _check_closeRcR`t NO_CONTENTt NOT_MODIFIEDRQ(R&RTR2RUtskipped_headersthdrttr_encRX((s/usr/lib64/python2.7/httplib.pytbeginÓsj                       cCs·|jjdƒ}|jdkrS|jjdƒ}|rOd|jƒkrOtStS|jjdƒritS|r…d|jƒkr…tS|jjdƒ}|r³d|jƒkr³tStS(Nt connectioni Ras keep-alivesproxy-connection(RRRhRTRiR7tFalse(R&tconntpconn((s/usr/lib64/python2.7/httplib.pyRj$scCs&|jr"|jjƒd|_ndS(N(R4RaR$(R&((s/usr/lib64/python2.7/httplib.pyRaBs  cCs |jdkS(N(R4R$(R&((s/usr/lib64/python2.7/httplib.pytisclosedGscCsT|jdkrdS|jdkr0|jƒdS|jrF|j|ƒS|dkrÁ|jdkrs|jjƒ}n@y|j|jƒ}Wnt k r©|jƒ‚nXd|_|jƒ|S|jdk rî||jkrî|j}qîn|jj|ƒ}|s|jƒn|jdk rP|jt |ƒ8_|jsP|jƒqPn|S(NR.Rfi( R4R$RQRaRVt _read_chunkedRXtreadt _safe_readR R8(R&tamtts((s/usr/lib64/python2.7/httplib.pyRwRs:          cCs.|j}g}x§tr¸|dkrÜ|jjtdƒ}t|ƒtkr[tdƒ‚n|jdƒ}|dkrƒ|| }nyt |dƒ}Wn0t k rÈ|j ƒt dj |ƒƒ‚nX|dkrÜPqÜn|dkr|j|j|ƒƒn¡||kr=|j|j|ƒƒ|||_dj |ƒS||kr‚|j|j|ƒƒ|jdƒd|_dj |ƒS|j|j|ƒƒ||8}|jdƒd}qWx[tr|jjtdƒ}t|ƒtkrùtdƒ‚n|sPn|d kr¼Pq¼q¼W|j ƒdj |ƒS( Nis chunk sizet;iiR.is trailer lines (RWR7R$R4R;R<R8R=tfindRcR`RaR R%R?Rx(R&RyRWR(RIti((s/usr/lib64/python2.7/httplib.pyRvsT                      cCsg}xi|dkrq|jjt|tƒƒ}|sQtdj|ƒ|ƒ‚n|j|ƒ|t|ƒ8}q Wdj|ƒS(sVRead the number of bytes requested, compensating for partial reads. Normally, we have a blocking socket, but a read() can be interrupted by a signal (resulting in a partial read). Note that we cannot distinguish between EOF and an interrupt when zero bytes have been read. IncompleteRead() will be raised in this situation. This function should be used when bytes "should" be present for reading. If the bytes are truly not available (due to EOF), then the IncompleteRead exception can be used to detect the problem. iR.(R4Rwtmint MAXAMOUNTR R%R?R8(R&RyRztchunk((s/usr/lib64/python2.7/httplib.pyRx¹s cCs |jjƒS(N(R4tfileno(R&((s/usr/lib64/python2.7/httplib.pyR�ÕscCs.|jdkrtƒ‚n|jj||ƒS(N(RRR$RRh(R&tnametdefault((s/usr/lib64/python2.7/httplib.pyRhØs cCs(|jdkrtƒ‚n|jjƒS(s&Return list of (header, value) tuples.N(RRR$Rtitems(R&((s/usr/lib64/python2.7/httplib.pyt getheadersÝs N(RKRLR$RrR]RdReRpRjRaRuRwRvRxR�RhR…(((s/usr/lib64/python2.7/httplib.pyRus  '  Q   - :   cBseZdZdZeZeZdZdZ dZ dde j dd„Zddd„Zd„Zd„Zd„Zd „Zd „Zd „Zd „Zd „Zdd„Zddd„Zd„Zd„Zdd„Zdid„Zd„Zd„Ze d„Z!RS(i sHTTP/1.1iicCs ||_||_d|_g|_d|_t|_d|_d|_ d|_ i|_ |dk rr||_ n|j ||ƒ\|_|_tj|_dS(N(ttimeouttsource_addressR$RZt_buffert_HTTPConnection__responset_CS_IDLEt_HTTPConnection__stateRQt _tunnel_hostt _tunnel_portt_tunnel_headersRPt _get_hostportthosttporttsockettcreate_connectiont_create_connection(R&R�R‘RPR†R‡((s/usr/lib64/python2.7/httplib.pyR]ïs            cCsY|jrtdƒ‚n|j||ƒ\|_|_|rH||_n |jjƒdS(sC Set up host and port for HTTP CONNECT tunnelling. In a connection that uses HTTP Connect tunneling, the host passed to the constructor is used as proxy server that relays all communication to the endpoint passed to set_tunnel. This is done by sending a HTTP CONNECT request to the proxy server when the connection is established. This method must be called before the HTTP connection has been established. The headers argument should be a mapping of extra HTTP headers to send with the CONNECT request. s.Can't setup tunnel for established connection.N(RZt RuntimeErrorR�RŒR�RŽtclear(R&R�R‘R1((s/usr/lib64/python2.7/httplib.pyt set_tunnels   cCsó|dkré|jdƒ}|jdƒ}||kr§yt||dƒ}WnItk r™||ddkr~|j}qštd||dƒ‚nX|| }n |j}|ré|ddkré|ddkré|dd!}qén||fS( Nt:t]iR.snonnumeric port: '%s'it[iÿÿÿÿ(R$trfindRcR`t default_portR(R&R�R‘R}tj((s/usr/lib64/python2.7/httplib.pyR�s      &cCs"|j||ƒ\|_|_dS(N(R�R�R‘(R&R�R‘((s/usr/lib64/python2.7/httplib.pyt _set_hostport/scCs ||_dS(N(RO(R&tlevel((s/usr/lib64/python2.7/httplib.pytset_debuglevel2scCs4|jd|j|jfƒx4|jjƒD]#\}}|jd||fƒq-W|jdƒ|j|jd|jd|jƒ}|j ƒ\}}}|dkrÒ|j ƒt j d||j ƒfƒ‚nx[tr/|jjtdƒ}t|ƒtkrtd ƒ‚n|sPn|dkrÕPqÕqÕWdS( NsCONNECT %s:%d HTTP/1.0 s%s: %s s RPR[iÈsTunnel connection failed: %d %sis header line(tsendRŒR�RŽt iteritemstresponse_classRZRPRQRdRaR’RR@R7R4R;R<R8R=(R&theaderR(tresponseRTtcodetmessageRI((s/usr/lib64/python2.7/httplib.pyt_tunnel5s(       cCsD|j|j|jf|j|jƒ|_|jr@|jƒndS(s3Connect to the host and port specified in __init__.N(R”R�R‘R†R‡RZRŒR¨(R&((s/usr/lib64/python2.7/httplib.pytconnectNs cCsQ|jr"|jjƒd|_n|jrD|jjƒd|_nt|_dS(s(Close the connection to the HTTP server.N(RZRaR$R‰RŠR‹(R&((s/usr/lib64/python2.7/httplib.pyRaVs      cCsà|jdkr1|jr%|jƒq1tƒ‚n|jdkrRdGt|ƒGHnd}t|dƒrÌt|t ƒ rÌ|jdkrŽdGHn|j |ƒ}x<|rÈ|jj |ƒ|j |ƒ}q Wn|jj |ƒdS(sSend `data' to the server.issend:i RwssendIng a read()ableN( RZR$t auto_openR©R ROR^R3t isinstanceRRwtsendall(R&tdatat blocksizet datablock((s/usr/lib64/python2.7/httplib.pyR¡`s    cCs|jj|ƒdS(suAdd a line of output to the current request buffer. Assumes that the line does *not* end with \r\n. N(RˆR?(R&Rz((s/usr/lib64/python2.7/httplib.pyt_outputtscCsx|jjdƒdj|jƒ}|j2t|tƒrK||7}d}n|j|ƒ|dk rt|j|ƒndS(s¸Send the currently buffered request and clear the buffer. Appends an extra \r\n to the buffer. A message_body may be specified, to be appended to the request. R.s N(R.R.(RˆtextendR%R«tstrR$R¡(R&t message_bodyRR((s/usr/lib64/python2.7/httplib.pyt _send_output{s    c CsF|jr$|jjƒr$d|_n|jtkr?t|_n tƒ‚|j|ƒ||_|smd}nt j |ƒ}|r¡t d||j ƒfƒ‚nd|||j f}|j|ƒ|jdkrB|s&d}|jdƒr t|ƒ\}}}}}n|r[y|jdƒ} Wn tk rG|jdƒ} nX|jd | ƒq&|jry|j} |j} n|j} |j} y| jdƒ} Wn tk rÀ| jdƒ} nX| jd ƒd krçd | d } n| |jkr |jd | ƒq&|jd d| | fƒn|sB|jddƒqBndS(s`Send a request to the server. `method' specifies an HTTP request method, e.g. 'GET'. `url' specifies the object being requested, e.g. '/index.html'. `skip_host' if True does not add automatically a 'Host:' header `skip_accept_encoding' if True does not add automatically an 'Accept-Encoding:' header t/s<URL can't contain control characters. %r (found at least %r)s%s %s %si R.thttptasciitidnatHostR˜iRšR™s%s:%ssAccept-EncodingtidentityN(R‰RuR$R‹RŠt_CS_REQ_STARTEDRt_validate_methodRQt!_contains_disallowed_url_pchar_retsearchRtgroupt _http_vsn_strR°t _http_vsnR>RtencodetUnicodeEncodeErrort putheaderRŒR�R�R‘R|Rœ( R&R[turlt skip_hosttskip_accept_encodingtmatchRntnetloctnilt netloc_encR�R‘thost_enc((s/usr/lib64/python2.7/httplib.pyt putrequest�sV                 cCs8tj|ƒ}|r4td||jƒfƒ‚ndS(s&Validate a method name for putrequest.s?method can't contain control characters. %r (found at least %r)N(t$_contains_disallowed_method_pchar_reR¾R`R¿(R&R[RÈ((s/usr/lib64/python2.7/httplib.pyR¼ s cGsÃ|jtkrtƒ‚nd|}t|ƒsGtd|fƒ‚ng|D]}t|ƒ^qN}x0|D](}t|ƒrmtd|fƒ‚qmqmWd|dj|ƒf}|j|ƒdS(skSend a request header line to the server. For example: h.putheader('Accept', 'text/html') s%ssInvalid header name %rsInvalid header value %rs%s: %ss N( R‹R»Rt_is_legal_header_nameR`R²t_is_illegal_header_valueR%R°(R&R¤tvaluestvt one_valueRn((s/usr/lib64/python2.7/httplib.pyRÄs     cCs5|jtkrt|_n tƒ‚|j|ƒdS(s‡Indicate that the last header line has been sent to the server. This method sends the request to the server. The optional message_body argument can be used to pass a message body associated with the request. The message body will be sent in the same packet as the message headers if it is string, otherwise it is sent as a separate packet. N(R‹R»t _CS_REQ_SENTRR´(R&R³((s/usr/lib64/python2.7/httplib.pyt endheaders+s   cCs|j||||ƒdS(s&Send a complete request to the server.N(t _send_request(R&R[RÅtbodyR1((s/usr/lib64/python2.7/httplib.pytrequest:scCs¨d}ytt|ƒƒ}Wnftk r„}y"ttj|jƒƒjƒ}Wq…tt fk r€|j dkr�dGHq�q…XnX|dk r¤|j d|ƒndS(Nis Cannot stat!!sContent-Length( R$R²R8t TypeErrortostfstatR�tst_sizetAttributeErrortOSErrorRORÄ(R&R×tthelentte((s/usr/lib64/python2.7/httplib.pyt_set_content_length>s" c CsÙtjg|D]}|jƒ^q ƒ}i}d|krGd|dCs6             mÿpÿ¯[ .