관리-도구
편집 파일: http.cpython-311.pyc
� �܋f� � �r � d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z m Z ddlmZ dej dddfd�ZdS ) z� raven.utils.http ~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. � )�absolute_importN)�defaults)�urllib2�httplib)�match_hostnameFc �4 ��� � G ��fd�dt j � � � G � fd�dt j � � }|r|g}n; t j t j � � �� � g}n# t $ r g }Y nw xY wt j |� }t j dk rkt j � � } t j |� � |� | |� � t j | � � S # t j | � � w xY w|� | ||� � S )Nc �0 �� e Zd Zej Zd� Z� �fd�ZdS )�%urlopen.<locals>.ValidHTTPSConnectionc �: � t j j | g|�R i |�� d S �N)r �HTTPConnection�__init__)�self�args�kwargss �G/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/utils/http.pyr z.urlopen.<locals>.ValidHTTPSConnection.__init__ s, � ��"�+�D�B�4�B�B�B�6�B�B�B�B�B� c �T �� t j | j | j f| j �� � }| j r|| _ | � � � t j |�t j �� � | _ ��5t | j � � � | j p| j � � d S d S )N)�address�timeout)�ca_certs� cert_reqs)�socket�create_connection�host�portr �_tunnel_host�sock�_tunnel�ssl�wrap_socket� CERT_REQUIREDr �getpeercert�assert_hostname)r r r$ r s ��r �connectz-urlopen.<locals>.ValidHTTPSConnection.connect s� �� ��+���D�I�.���� � �D� � � � �� ����������x�3�3D�F� F� F�D�I� �*��t�y�4�4�6�6�#�3�@�t�y�B� B� B� B� B� +�*r N)�__name__� __module__�__qualname__r � HTTPS_PORT�default_portr r% )r$ r s ��r �ValidHTTPSConnectionr sU �� � � � � ��)�� C� C� C� B� B� B� B� B� B� B� Br r+ c � �� e Zd Z� fd�ZdS )�"urlopen.<locals>.ValidHTTPSHandlerc �0 �� | � �|� � S r )�do_open)r �reqr+ s �r � https_openz-urlopen.<locals>.ValidHTTPSHandler.https_open- s �� ��<�<� 4�c�:�:�:r N)r&