/usr/lib/python2.6/site-packages/urllib3
Edit: /usr/lib/python2.6/site-packages/urllib3/response.pyc (15839B)
Ñò
;vVc
@ s d d k l Z d d k Z d d k Z d d k l Z d d k l Z d d k l
Z
l Z l Z l
Z
d d k l Z l Z l Z d d k l Z d d k l Z l Z d d
k l Z l Z d e f d „ ƒ YZ d
e f d „ ƒ YZ d „ Z d e i f d „ ƒ YZ! d S( iÿÿÿÿ( t contextmanagerN( t timeouti ( t HTTPHeaderDict( t
ProtocolErrort DecodeErrort ReadTimeoutErrort ResponseNotChunked( t string_typest binary_typet PY3( t http_client( t
HTTPExceptiont BaseSSLError( t is_fp_closedt is_response_to_headt DeflateDecoderc B s# e Z d „ Z d „ Z d „ Z RS( c C s( t | _ t ƒ | _ t i ƒ | _ d S( N( t Truet
_first_tryR t _datat zlibt
decompressobjt _obj( t self( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyt __init__ s c C s t | i | ƒ S( N( t getattrR ( R t name( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyt __getattr__ s c C s§ | p | S| i p | i i | ƒ S| i | 7_ y | i i | ƒ SWnV t i j
oG t | _ t i t i ƒ | _ z | i | i ƒ SWd d | _ Xn Xd S( N(
R R t
decompressR R t errort FalseR t MAX_WBITSt None( R t data( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR s
( t __name__t
__module__R R R ( ( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR s t GzipDecoderc B s# e Z d „ Z d „ Z d „ Z RS( c C s t i d t i ƒ | _ d S( Ni ( R R R R ( R ( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR / s c C s t | i | ƒ S( N( R R ( R R ( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR 2 s c C s | p | S| i i | ƒ S( N( R R ( R R ( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR 5 s ( R! R" R R R ( ( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyR# - s c C s | d j o t ƒ St ƒ S( Nt gzip( R# R ( t mode( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pyt _get_decoder; s
t HTTPResponsec B sF e Z d Z d d g Z d d d d d g Z d d" d d d" d e e d" d" d" d
„ Z d „ Z d „ Z e
d
„ ƒ Z d „ Z d „ Z
d „ Z e d „ ƒ Z d" d" e d „ Z d# d" d „ Z e d „ ƒ Z d „ Z d" d „ Z d „ Z e
d „ ƒ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d" d" d! „ Z RS($ sÅ
HTTP Response container.
Backwards-compatible to httplib's HTTPResponse but the response ``body`` is
loaded and decoded on-demand when the ``data`` property is accessed. This
class is also compatible with the Python standard library's :mod:`io`
module, and can hence be treated as a readable object in the context of that
framework.
Extra parameters for behaviour not present in httplib.HTTPResponse:
:param preload_content:
If True, the response's body will be preloaded during construction.
:param decode_content:
If True, attempts to decode specific content-encoding's based on headers
(like 'gzip' and 'deflate') will be skipped and raw data will be used
instead.
:param original_response:
When this HTTPResponse wrapper is generated from an httplib.HTTPResponse
object, it's convenient to include the original for debug purposes. It's
otherwise unused.
R$ t deflatei- i. i/ i3 i4 t i c C sy t | t ƒ o
| | _ n t | ƒ | _ | | _ | | _ | | _ | | _ | | _ d | _ d | _
d | _ | | _ d | _
| o# t | t t f ƒ o
| | _
n |
| _ | | _ t | d ƒ o
| | _ n t | _ d | _ | i i d d ƒ i ƒ } d „ | i d ƒ Dƒ }
d |
j o
t | _ n | i o+ | o$ | i
o | i d | ƒ | _
n d S( Ni t reads transfer-encodingR) c s s x | ] } | i ƒ Vq Wd S( N( t strip( t .0t enc( ( s1 /tmp/pip-build-cD3xZi/urllib3/urllib3/response.pys