File: //lib/python3.6/site-packages/urllib3/__pycache__/connection.cpython-36.pyc
3
��v_= � @ s� d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZm Z
d dlZd dlZd dl
mZ d dl
mZ yd dlZejZW n, eefk
r� dZG dd� de�ZY nX yeZW n$ ek
r� G dd � d e�ZY nX d
dlmZmZmZmZ d
dlm Z m!Z! d
d
l"m#Z#m$Z$m%Z%m&Z&m'Z' d
dl(m)Z) d
dl*m+Z+ ej,e-�Z.ddd�Z/ej0dd
d
�Z1ej2d�Z3G dd� de4�Z5G dd� dee4�ZG dd� de�Z6G dd� de6�Z7dd� Z8e�r�e6Z9e7Z6ne5Z6dS )� )�absolute_importN)�error�timeout)�HTTPConnection)�
HTTPExceptionc @ s e Zd ZdS )�BaseSSLErrorN)�__name__�
__module__�__qualname__� r r � /usr/lib/python3.6/connection.pyr s r c @ s e Zd ZdS )�ConnectionErrorN)r r r
r r r r r
s r
� )�NewConnectionError�ConnectTimeoutError�SubjectAltNameWarning�SystemTimeWarning)�match_hostname�CertificateError)�resolve_cert_reqs�resolve_ssl_version�assert_fingerprint�create_urllib3_context�ssl_wrap_socket)�
connection)�HTTPHeaderDict�P i� )�http�httpsi� z[^-!#$%&'*+.^_`|~0-9a-zA-Z]c @ s e Zd ZdZdS )�DummyConnectionz-Used to detect a failed ConnectionCls import.N)r r r
�__doc__r r r r r A s r c @ sx e Zd ZdZed ZejejdfgZ dZ
dd� Zedd� �Z
e
jd d� �Z
d
d� Zdd
� Zdd� Zdd� Zddd�ZdS )r a$
Based on httplib.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::
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 O sD t js|jdd � |jd�| _|jd| j�| _tj| f|�|� d S )N�strict�source_address�socket_options) �sixZPY2�pop�getr"