Repository URL to install this package:
Version:
0.1.1-1 ▾
|
odigos
/
etc
/
odigos-vmagent
/
instrumentations
/
python
/
urllib3
/
__pycache__
/
connection.cpython-311.pyc
|
---|
§ ÞEqfLO ã ó¢ 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)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 ddl2m3Z3m4Z4 ej5 e6¦ « Z7dddZ8 ej9 ddd¦ « Z: ej; d¦ « Z< G d dee=¦ « Z G d de¦ « Z>d Z?d Z@ G d! d"e=¦ « ZAeseAZ>e>ZBdS )#é )Úabsolute_importN)Úerror)Útimeouté )Úsix)ÚHTTPConnection)Ú HTTPException)Úcreate_proxy_ssl_contextc ó e Zd ZdS )ÚBaseSSLErrorN©Ú__name__Ú __module__Ú__qualname__© ó ú9/tmp/pip-target-asg8frr5/lib/python/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)ÚSKIP_HEADERÚSKIPPABLE_HEADERSÚ connection)Úassert_fingerprintÚcreate_urllib3_contextÚis_ipaddressÚresolve_cert_reqsÚresolve_ssl_versionÚssl_wrap_socket)ÚCertificateErrorÚmatch_hostnameéP i» )ÚhttpÚhttpsiæ z[^-!#$%&'*+.^_`|~0-9a-zA-Z]c óÄ e Zd ZdZed Zej ej dfgZ dZ dZd Ze d ¦ « Zej d ¦ « Zd 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 FNc ó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__s s§ Ýwð #ØFF8TÑ"Ô"Ð"ð !ffÐ%5Ñ6Ô6Ôð !ffÐ%5°tÔ7RÑSÔSÔð VVG TÑ*Ô* ØFF >°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 ð" ~×$Ò$ 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<