ok
Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/urllib3/__pycache__/ |
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/urllib3/__pycache__/connection.cpython-311.pyc |
� m��fBI � � � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z ddlm Z ddlmZ ddlmZ dd lmZ d dlZej Zn# eef$ r dZ G d � de� � ZY nw xY w eZn# e$ r G d� d e� � ZY nw xY w eZn# e$ r G d� de� � ZY nw xY wddlmZ ddl m!Z! ddl"m#Z#m$Z$m%Z%m&Z& ddl'm(Z(m)Z) ddl*m+Z+m,Z,m-Z- ddl.m/Z/m0Z0m1Z1m2Z2m3Z3 ej4 e5� � Z6ddd�Z7 ej8 ddd� � Z9 ej: d� � Z; G d� dee<� � Z G d� de� � Z=d � Z>d!� Z? G d"� d#e<� � Z@ese@Z=e=ZAdS )$� )�absolute_importN)�error)�timeout� )�six)�HTTPConnection)� HTTPException)�create_proxy_ssl_contextc � � e Zd ZdS )�BaseSSLErrorN��__name__� __module__�__qualname__� � �I/opt/imunify360/venv/lib64/python3.11/site-packages/urllib3/connection.pyr r � � � � � � ��r r c � � e Zd ZdS )�ConnectionErrorNr r r r r r ! r r r c � � e Zd ZdS )�BrokenPipeErrorNr r r r r r * r r r )�HTTPHeaderDict��__version__)�ConnectTimeoutError�NewConnectionError�SubjectAltNameWarning�SystemTimeWarning)�CertificateError�match_hostname)�SKIP_HEADER�SKIPPABLE_HEADERS� connection)�assert_fingerprint�create_urllib3_context�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket�P i� )�http�httpsi� � z[^-!#$%&'*+.^_`|~0-9a-zA-Z]c � � � e Zd ZdZed Zej ej dfgZ dZ d� Zed� � � Z e j d� � � Z d� Zd � Zd � Zd� Zd� Zd � Zd� fd� Zdd�Z� xZS )r a5 Based on :class:`http.client.HTTPConnection` but provides an extra constructor backwards-compatibility layer between older and newer Pythons. Additional keyword parameters are used to configure attributes of the connection. Accepted parameters include: - ``strict``: See the documentation on :class:`urllib3.connectionpool.HTTPConnectionPool` - ``source_address``: Set the source address for the current connection. - ``socket_options``: Set specific options on the underlying socket. If not specified, then defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy. For example, if you wish to enable TCP Keep Alive in addition to the defaults, you might pass: .. code-block:: python HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), ] Or you may want to disable the defaults by passing an empty list (e.g., ``[]``). r+ r Fc �T � t j s|� dd � � |� d� � | _ |� d| j � � | _ |� dd � � | _ |� dd � � | _ t j | g|�R i |�� d S )N�strict�source_address�socket_options�proxy�proxy_config)r �PY2�pop�getr1 �default_socket_optionsr2 r3 r4 �_HTTPConnection�__init__)�self�args�kws r r: zHTTPConnection.__init__n s� � ��w� #��F�F�8�T�"�"�"� !�f�f�%5�6�6��� !�f�f�%5�t�7R�S�S��� �V�V�G�T�*�*�� ��F�F�>�4�8�8���� ��3��3�3�3��3�3�3�3�3r c �6 � | j � d� � S )a� Getter method to remove any trailing dots that indicate the hostname is an FQDN. In general, SSL certificates don't include the trailing dot indicating a fully-qualified domain name, and thus, they don't validate properly when checked against a domain name that includes the dot. In addition, some servers may not expect to receive the trailing dot when provided. However, the hostname with trailing dot is critical to DNS resolution; doing a lookup with the trailing dot will properly only resolve the appropriate FQDN, whereas a lookup without a trailing dot will search the system's search domain list. Thus, it's important to keep the original host around for use only in those cases where it's appropriate (i.e., when doing DNS lookup to establish the actual TCP connection across which we're going to send HTTP requests). �.)� _dns_host�rstrip�r; s r �hostzHTTPConnection.host s � �"