ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ nf\c@@sddlmZddlZddlZddlZddlmZddlmZm Z ddlm Z ddl m Z m Z mZddlmZdd lmZdd lmZdd lmZdd lmZd ddgZejeZd6Zd7Zejd/eZ d0Z!iej"e!e d16ej"e!e d26Z#ied16e d26Z$d efd3YZ%de%fd4YZ&d5Z'dS(8i(tabsolute_importNi(tRecentlyUsedContainer(tHTTPConnectionPooltHTTPSConnectionPool(tport_by_scheme(tLocationValueErrort MaxRetryErrortProxySchemeUnknown(tsix(turljoin(tRequestMethods(t parse_url(tRetryt PoolManagert ProxyManagertproxy_from_urltkey_filet cert_filet cert_reqstca_certst ssl_versiont ca_cert_dirt ssl_contextt key_schemetkey_hosttkey_portt key_timeoutt key_retriest key_strictt key_blocktkey_source_addresst key_key_filet key_cert_filet key_cert_reqst key_ca_certstkey_ssl_versiontkey_ca_cert_dirtkey_ssl_contextt key_maxsizet key_headerst key__proxytkey__proxy_headerstkey_socket_optionstkey__socks_optionstkey_assert_hostnametkey_assert_fingerprinttkey_server_hostnametPoolKeycC@s|j}|dj|d<|dj|d>> manager = PoolManager(num_pools=2) >>> r = manager.request('GET', 'http://google.com/') >>> r = manager.request('GET', 'http://google.com/mail') >>> r = manager.request('GET', 'http://yahoo.com/') >>> len(manager.pools) 2 i cK@sMtj||||_t|dd|_t|_tj|_dS(Nt dispose_funccS@s |jS(N(tclose(tp((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pytt(R t__init__tconnection_pool_kwRtpoolstpool_classes_by_schemetkey_fn_by_schemeR7(tselft num_poolsR2RQ((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyRPs    cC@s|S(N((RU((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyt __enter__scC@s|jtS(N(tcleartFalse(RUtexc_typetexc_valtexc_tb((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyt__exit__s cC@s|j|}|dkr+|jj}nxdD]}|j|dq2W|dkr|x!tD]}|j|dq_Wn||||S(s Create a new :class:`ConnectionPool` based on host, port, scheme, and any additional pool keyword arguments. If ``request_context`` is provided, it is provided as keyword arguments to the pool class used. This method is used to actually create the connection pools handed out by :meth:`connection_from_url` and companion methods. It is intended to be overridden for customization. R0R1tportRIN(R0R1R^(RSR9RQR7R@t SSL_KEYWORDS(RUR0R1R^RCtpool_clsREtkw((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyt _new_pools     cC@s|jjdS(s Empty our store of pools and direct them all to close. This will not affect in-flight connections, but they will not be re-used after completion. N(RRRX(RU((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyRXsRIcC@sz|stdn|j|}|p-d|d<|sYtj|djd}n||d<||d<|j|S(s Get a :class:`ConnectionPool` based on the host, port, and scheme. If ``port`` isn't given, it will be derived from the ``scheme`` using ``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is provided, it is merged with the instance's ``connection_pool_kw`` variable and used to create the new connection pool, if one is needed. sNo host specified.RIR0iPR^R1(Rt_merge_pool_kwargsRR<R8tconnection_from_context(RUR1R^R0t pool_kwargsRC((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pytconnection_from_hosts   cC@s<|dj}|j|}||}|j|d|S(s Get a :class:`ConnectionPool` based on the request context. ``request_context`` must at least contain the ``scheme`` key and its value must be a key in ``key_fn_by_scheme`` instance variable. R0RC(R8RTtconnection_from_pool_key(RURCR0tpool_key_constructortpool_key((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyRds  c C@sy|jjg|jj|}|r)|S|d}|d}|d}|j|||d|}||j| %sN(R RfR1R^R0RYR2R7tproxyR9turlopent request_uritget_redirect_locationR tstatusR<t isinstanceR tfrom_inttremove_headers_on_redirectt is_same_hostR>RtiterkeysR8R@t incrementRtraise_on_redirecttlogtinfo( RUtmethodRlRtRaRmtconnRwtredirect_locationRvR2theader((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyRz/sD $      "    N(t__name__t __module__t__doc__R9RyRPRWR]RbRXRfRdRgRnRctTrueRz(((s7/usr/lib/python2.7/site-packages/urllib3/poolmanager.pyR {s       cB@sJeZdZddddZddddZddZedZRS(sx Behaves just like :class:`PoolManager`, but sends all requests through the defined proxy, using the CONNECT method for HTTPS URLs. :param proxy_url: The URL of the proxy to be used. :param proxy_headers: A dictionary containing headers that will be sent to the proxy. In case of HTTP they are being sent with each request, while in the HTTPS/CONNECT case they are sent only once. Could be used for proxy authentication. Example: >>> proxy = urllib3.ProxyManager('http://localhost:3128/') >>> r1 = proxy.request('GET', 'http://google.com/') >>> r2 = proxy.request('GET', 'http://httpbin.org/') >>> len(proxy.pools) 1 >>> r3 = proxy.request('GET', 'https://httpbin.org/') >>> r4 = proxy.request('GET', 'https://twitter.com/') >>> len(proxy.pools) 3 i cK@st|tr.d|j|j|jf}nt|}|jsmtj|jd}|jd|}n|jdkrt |jn||_ |pi|_ |j |d<|j |dsf    5 W