HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.29
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/lib64/python3.6/site-packages/M2Crypto/__pycache__/m2urllib2.cpython-36.opt-1.pyc
3

{��[��@sddlmZddlZddlmZmZmZmZddlm	Z	m
Zddlm
Z
ejr^ddlmZmZejrvddlTddlTnddlTy
ejZWnek
r�ejZYnXGdd	�d	e�ZyeWn$ek
r�ddlZejjZYnXGd
d�de�Zddd
�Z dS)�)�absolute_importN)�SSL�httpslib�six�util)�	urldefrag�urlparse)�
addinfourl)�List�Optional)�*c@seZdZdZdS)�_closing_fileobjectz�socket._fileobject that propagates self.close() to the socket.

    Python 2.5 provides this as socket._fileobject(sock, close=True).
    N)�__name__�
__module__�__qualname__�__doc__�rr�!/usr/lib64/python3.6/m2urllib2.pyr
'sr
c@s$eZdZddd�Zdd�ZejZdS)�HTTPSHandlerNcCs(tj|�|dk	r||_n
tj�|_dS)N)�AbstractHTTPHandler�__init__�ctxrZContext)�self�ssl_contextrrrr7s
zHTTPSHandler.__init__c"Cs�y|j�}Wntk
r&|j}YnX|s4td��|j�}t|�d}||krnt|�d}tj||j	d�}n8y|j
�}Wntk
r�|j}YnXtj||j	d�}|j
|j�t|j�}|j|j�d|d<y"|j|j�||j|�|j�}Wn.tjk
�r }	zt|	��WYdd}	~	XnX|j|_tj�rBtj|dd	�}
n.d
d�|_|jj |_ d|_!|j"|_#tj$|d
�}
t%|
|j&|j��}|j'|_(|j)|_&|S)a�Return an addinfourl object for the request, using http_class.

        http_class must implement the HTTPConnection API from httplib.
        The addinfourl return value is a file-like object.  It also
        has methods and attributes including:

            - info(): return a mimetools.Message object for the headers

            - geturl(): return the original request URL

            - code: HTTP status code
        z
no host given�r)�hostr�closeZ
ConnectionNT)rcSsdS)Nrrrrr�<lambda>�sz)HTTPSHandler.https_open.<locals>.<lambda>g�?�rbg�)*Zget_host�AttributeErrorrZURLErrorZget_full_url�	url_parserrZProxyHTTPSConnectionrZget_selectorZselectorZHTTPSConnectionZset_debuglevelZ_debuglevel�dict�headers�updateZunredirected_hdrs�requestZ
get_method�dataZgetresponse�socket�error�readZrecvrZPY2�_fileobjectZ_decref_socketiosZsockZsslZ_timeout�readintoZ	recv_into�SocketIOr	�msgZstatus�code�reason)rZreqrZfull_urlZtarget_hostZrequest_uri�hr"�r�err�fpZresprrr�
https_openBsJ
	

zHTTPSHandler.https_open)N)rrrrr3rZdo_request_Z
https_requestrrrrr6s
Lrc	Gs�dd�}t�}ttttttttg}g}xL|D]D}x>|D]6}||�rXt	||�rl|j
|�q6t||�r6|j
|�q6Wq,Wx|D]}|j|�qzWx|D]}|j
|��q�Wt|kr�|j
t|��x$|D]}||�r�|�}|j
|�q�W|S)aCreate an opener object from a list of handlers.

    The opener will use several default handlers, including support
    for HTTP and FTP.

    If any of the handlers passed as arguments are subclasses of the
    default handlers, the default handlers will not be used.
    cSst|t�pt|d�S)N�	__bases__)�
isinstance�type�hasattr)�objrrr�isclass�szbuild_opener.<locals>.isclass)ZOpenerDirectorZProxyHandlerZUnknownHandlerZHTTPHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZ
FTPHandlerZFileHandlerZHTTPErrorProcessor�
issubclass�appendr5�removeZadd_handlerr)	rZhandlersr9�openerZdefault_classes�skip�klassZcheckr/rrr�build_opener�s0







r@)N)!Z
__future__rr&ZM2CryptorrrrZM2Crypto.six.moves.urllib_parserrr Z"M2Crypto.six.moves.urllib_responser	Zpy27plusZtypingr
rZPY3Zurllib.requestZurllib.errorZurllib2r)Zmother_classrr+r
r�	NameErrorZurllibr$rr@rrrr�<module>s,

\