o
    tBht                     @   s$   d Z ddlmZ G dd deZdS )z
requests_toolbelt.adapters.host_header_ssl
==========================================

This file contains an implementation of the HostHeaderSSLAdapter.
    )HTTPAdapterc                       s    e Zd ZdZ fddZ  ZS )HostHeaderSSLAdaptera  
    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                    sl   d }|j D ]}| dkr|j | } nq| jj}|r ||d< n
d|v r*|dd  tt| j|fi |S )Nhostassert_hostname)headerslowerpoolmanagerconnection_pool_kwpopsuperr   send)selfrequestkwargshost_headerheaderconnection_pool_kwargs	__class__ /var/www/html/riverr-enterprise-integrations-main/venv/lib/python3.10/site-packages/requests_toolbelt/adapters/host_header_ssl.pyr      s   


zHostHeaderSSLAdapter.send)__name__
__module____qualname____doc__r   __classcell__r   r   r   r   r      s    r   N)r   requests.adaptersr   r   r   r   r   r   <module>   s   