/usr/lib/python2.6/site-packages/requests/packages/urllib3
NameSizeModeActions
contrib/-0755rm
packages/-0755rm
util/-0755rm
connection.py90110644editdlrm
connection.pyc82690644editdlrm
connectionpool.py303190644editdlrm
connectionpool.pyc248680644editdlrm
exceptions.py43740644editdlrm
exceptions.pyc91910644editdlrm
fields.py58330644editdlrm
fields.pyc67670644editdlrm
filepost.py22810644editdlrm
filepost.pyc33150644editdlrm
poolmanager.py94060644editdlrm
poolmanager.pyc102160644editdlrm
request.py57510644editdlrm
request.pyc60380644editdlrm
response.py164590644editdlrm
response.pyc158140644editdlrm
_collections.py104540644editdlrm
_collections.pyc132730644editdlrm
__init__.py20550644editdlrm
__init__.pyc27660644editdlrm
Edit: /usr/lib/python2.6/site-packages/requests/packages/urllib3/response.pyc (15814B)
Ñò ƒs t,tchunkedtdecode_content(t isinstanceRtheaderststatustversiontreasontstrictR-Rt_decodert_bodyt_fpt_original_responset_fp_bytes_readt basestringRt_poolt _connectionthasattrRR,t chunk_lefttgettlowertsplitR R'(RtbodyR/R0R1R2R3tpreload_contentR-toriginal_responsetpoolt connectionttr_enct encodings((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRas6                   cCs(|i|ijo|iidƒStS(s Should we redirect and where to? :returns: Truthy redirect location string if we got a redirect status code and valid location. ``None`` if redirect status and no location. ``False`` if not a redirect status code. tlocation(R0tREDIRECT_STATUSESR/R>R(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pytget_redirect_location‹scCs;|i p |i odS|ii|iƒd|_dS(N(R:R;t _put_connR(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt release_conn˜scCs1|io|iS|io|idtƒSdS(Nt cache_content(R5R6R'R (R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRŸs  cCs|iS(sÛ Obtain the number of bytes pulled over the wire so far. May differ from the amount of content returned by :meth:``HTTPResponse.read`` if bytes are encoded on the wire (e.g, compressed). (R8(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyttell¨scCsR|iiddƒiƒ}|idjo#||ijot|ƒ|_ndS(s< Set-up the _decoder attribute if necessar. scontent-encodingR&N(R/R>R?R4RtCONTENT_DECODERSR#(Rtcontent_encoding((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt _init_decoder°s cCsÆy+|o |io|ii|ƒ}nWnLttifj o7}|iiddƒiƒ}td||ƒ‚nX|oA|o:|io0|iit ƒƒ}|||ii ƒ7}n|S(sN Decode the data passed in and potentially flush the decoder. scontent-encodingR&sEReceived response with content-encoding: %s, but failed to decode it.( R4RtIOErrorRRR/R>R?RRtflush(RRR-t flush_decoderteRPtbuf((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt_decodeºsc Cs¸|iƒ|djo |i}n|idjodSt}zIyn|djo|iiƒ}t}nEt}|ii|ƒ}|djo| o|iiƒt}nWn’tj ot |i ddƒ‚nlt j o8}dt |ƒjo‚nt |i ddƒ‚n)t j o}td||ƒ‚nX|it|ƒ7_|i|||ƒ}|o ||_n|SWd|io|iiƒo|iƒnXdS(sP Similar to :meth:`httplib.HTTPResponse.read`, but with two additional parameters: ``decode_content`` and ``cache_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache partial content as the full response. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param cache_content: If True, will save the returned data such that the same result is returned despite of the state of the underlying file object. This is useful if you want the ``.data`` property to continue working after having ``.read()`` the file object. (Overridden if ``amt`` is set.) NisRead timed out.sread operation timed outsConnection broken: %r(RQRR-R6RR'R tcloset SocketTimeoutRR:R tstrR RR8tlenRWR5R7tisclosedRL(RtamtR-RMRTRRU((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyR'Ís>       iiccsw|io)xf|i|d|ƒD] }|Vq WnAx=t|iƒp,|id|d|ƒ}|o |Vq6q6WdS(s_ A generator wrapper for the read() method. A call will block until ``amt`` bytes have been read from the connection or until the connection is closed. :param amt: How much of the content to read. The generator will return up to much data per iteration, but may return less. This is particularly likely when using compressed data. However, the empty string will never be returned. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. R-R]N(R,t read_chunkedR R6R'(RR]R-tlineR((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pytstreams  cKsž|i}t|tƒp0tot|iƒƒ}qIti|ƒ}nt|ddƒ}|d|d|d|id|id|i d|d||}|S( s  Given an :class:`httplib.HTTPResponse` instance ``r``, return a corresponding :class:`urllib3.response.HTTPResponse` object. Remaining parameters are passed to the HTTPResponse constructor, along with ``original_response=r``. R3iRAR/R0R1R2RC( tmsgR.RRtitemst from_httplibRR0R1R2(t ResponseClstrt response_kwR/R3tresp((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRc8s      cCs|iS(N(R/(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt getheadersUscCs|ii||ƒS(N(R/R>(RRtdefault((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt getheaderXscCs|ip|iiƒndS(N(tclosedR6RX(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRX\s cCs\|idjotSt|idƒo |iiSt|idƒo|iiƒStSdS(NRkR\(R6RR R<RkR\(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRk`s cCsQ|idjotdƒ‚n.t|idƒo|iiƒStdƒ‚dS(Ns-HTTPResponse has no file to get a fileno fromtfilenosOThe file-like object this HTTPResponse is wrapped around has no file descriptor(R6RRRR<Rl(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRlks cCs5|idj o!t|idƒo|iiƒSdS(NRS(R6RR<RS(R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyRSts#cCstS(N(R (R((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pytreadablexscCsK|it|ƒƒ}t|ƒdjodS||t|ƒ*t|ƒSdS(Ni(R'R[(Rtbttemp((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pytreadinto|s cCs†|idj odS|iiiƒ}|iddƒd}yt|dƒ|_Wn,tj o |iƒt i |ƒ‚nXdS(Nt;iii( R=RR6tfptreadlineR@tintt ValueErrorRXthttplibtIncompleteRead(RR_((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt_update_chunk_length…s cCsþd}|djo8|ii|iƒ}|}|iidƒd|_n°||ijo,|ii|ƒ}|i||_|}nt||ijo5|ii|ƒ}|iidƒd|_|}n/|ii|iƒ}|iidƒd|_|S(Ni(RR6t _safe_readR=(RR]treturned_chunktchunktvalue((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyt _handle_chunk“s&      ccs|iƒ|iptdƒ‚n|io+|iiiƒdjo|iiƒdSxTtoL|iƒ|i djoPn|i |ƒ}|i |d|dtƒVq\Wx<to4|i i iƒ}|pPn|djoPq³q³W|io|iiƒn|iƒdS(sþ Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. sHResponse is not chunked. Header 'transfer-encoding: chunked' is missing.tHEADNiR-RTs (RQR,RR7t_methodtupperRXR RxR=R}RWR6RrRsRL(RR]R-R{R_((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyR^©s0  #      Ni(RRt__doc__RORIRR RRJRLtpropertyRRNRQRWRR'R`t classmethodRcRhRjRXRkRlRSRmRpRxR}R^(((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyR$Ds4  (   Q       ( t http.clienttclientRvt ImportErrorRtiotsocketRRYt _collectionsRt exceptionsRRRRt packages.sixRR9RRRER R t util.responseR tobjectR R R#tIOBaseR$(((sD/tmp/pip-build-cD3xZi/requests/requests/packages/urllib3/response.pyts  "