�
ӵ Yc @ s0 d Z d d l m Z d e f d � � YZ d S( s�
requests_toolbelt.adapters.host_header_ssl
==========================================
This file contains an implementation of the HostHeaderSSLAdapter.
i����( t HTTPAdaptert HostHeaderSSLAdapterc B s e Z d Z d � Z RS( s�
A HTTPS Adapter for Python Requests that sets the hostname for certificate
verification based on the Host header.
This allows requesting the IP address directly via HTTPS without getting
a "hostname doesn't match" exception.
Example usage:
>>> s.mount('https://', HostHeaderSSLAdapter())
>>> s.get("https://93.184.216.34", headers={"Host": "example.org"})
c K s� d } x4 | j D]) } | j � d k r | j | } Pq q W| j j } | r\ | | d <n d | k r{ | j d d � n t t | � j | | � S( Nt hostt assert_hostname( t Nonet headerst lowert poolmanagert connection_pool_kwt popt superR t send( t selft requestt kwargst host_headert headert connection_pool_kwargs( ( sN /usr/lib/python2.7/site-packages/requests_toolbelt/adapters/host_header_ssl.pyR s
( t __name__t
__module__t __doc__R ( ( ( sN /usr/lib/python2.7/site-packages/requests_toolbelt/adapters/host_header_ssl.pyR s
N( R t requests.adaptersR R ( ( ( sN /usr/lib/python2.7/site-packages/requests_toolbelt/adapters/host_header_ssl.pyt <module> s
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]