M9jgG 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 Z6dddZ7 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__ r/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/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__)ConnectTimeoutErrorNewConnectionErrorSubjectAltNameWarningSystemTimeWarning)CertificateErrormatch_hostname)SKIP_HEADERSKIPPABLE_HEADERS connection)assert_fingerprintcreate_urllib3_contextresolve_cert_reqsresolve_ssl_versionssl_wrap_socketP i )httphttpsi 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 ZddZ 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 )Nstrictsource_addresssocket_optionsproxyproxy_config)r PY2popgetr1 default_socket_optionsr2 r3 r4 _HTTPConnection__init__)selfargskws r r: zHTTPConnection.__init__n s w #FF8T""" !ff%566 !ff%5t7RSS VVGT** FF>488 333333333r 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_hostrstripr; s r hostzHTTPConnection.host s " ~$$S)))r c || _ dS )z Setter for the `host` property. We assume that only urllib3 uses the _dns_host attribute; httplib itself only uses `host`, and it seems reasonable that other libraries follow suit. N)r@ )r; values r rC zHTTPConnection.host s r c 8 i }| j r | j |d<