HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //proc/self/root/usr/local/lib/python3.9/site-packages/kombu/utils/__pycache__/url.cpython-39.pyc
a

X>hE�@s�dZddlmZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
zddlZdZWneyrd	ZYn0d
dlmZeedd
�Zee�ZGdd�de�Zdd�Zdd�ZeZddd�Zddd�Zddd�Zdd�ZdS) zURL Utilities.�)�annotations)�Mapping)�partial)�
NamedTuple)�	parse_qsl�quote�unquote�urlparseNTF�)�
get_logger�)�safec@sJeZdZUdZded<ded<ded<ded<ded<ded	<d
ed<dS)
�urlpartsz*Named tuple representing parts of the URL.�str�scheme�hostname�int�port�username�password�pathr�queryN)�__name__�
__module__�__qualname__�__doc__�__annotations__�rr�9/usr/local/lib/python3.9/site-packages/kombu/utils/url.pyrs
rc
	Cs�t|�\}}}}}}}|r�dd�|��D�}|D]v}	|	dkrR||	��dk||	<n.|	dkr�t||	�||	<||	dur�t�d�d|vr�i|d<||	|d|	<||	=q0tf||||||d	�|��S)
z%Parse URL into mapping of components.cSsg|]}|�d�r|�qS)�ssl_)�
startswith)�.0�keyrrr�
<listcomp>(�zparse_url.<locals>.<listcomp>Zssl_check_hostname�falseZ
ssl_cert_reqsNz%Defaulting to insecure SSL behaviour.�ssl)�	transportrrZuseridrZvirtual_host)�
_parse_url�keys�lower�parse_ssl_cert_reqs�logger�warning�dict)
�urlr�hostr�userrrrr)r"rrr�	parse_url#s(
��r2c
Cs�t|�j}|t|�dd�}td|�}|jp2d}|rP|ddkrP|dd�n|}t|t|jpbd�phd|jt|jpvd�p|dt|j	p�d�p�dt|p�d�p�dt
t|j���S)z5Parse URL into :class:`urlparts` tuple of components.�Nzhttp://rr�/�)
r	r�lenrrrrrrrr.rr)r/rZ
schemeless�partsrrrr�url_to_parts<s

 �r8�**c	
Cs�|�d�g}	|s|rd|r&|	�t|��|rZ|rH|	�|r>d|gndg�n|	�dt|�g�|	�d�|	�|rtt|�nd�|r�|	�d|g�|	�d|g�d�dd�|	D��S)z"Generate URL from component parts.�://�:�@rr4css|]}|rt|�VqdS)N)r)r!�partrrr�	<genexpr>er$zas_url.<locals>.<genexpr>)�append�	safequote�extend�join)
rr0rr1rrr�sanitize�maskr7rrr�as_urlSs
rEcCstt|�d|d��S)z)Return copy of URL with password removed.T)rCrD)rEr(�r/rDrrr�sanitize_urlhsrGcCs t|t�rd|vrt||�S|S)z-Sanitize url, or do nothing if url undefined.r:)�
isinstancerrGrFrrr�maybe_sanitize_urlns
rIcCs2tr*tjtjtjtjtjtjd�}||SdSdS)zMGiven the query parameter for ssl_cert_reqs, return the SSL constant or None.)�
CERT_REQUIRED�
CERT_OPTIONAL�	CERT_NONE�required�optional�noneN)�
ssl_availabler&rJrKrL)Zquery_valueZquery_value_to_constantrrrr+vs�r+)NNNNNNFr9)r9)r9)r�
__future__r�collections.abcr�	functoolsr�typingr�urllib.parserrrr	r&rP�ImportError�logrr@rr,rr2r8r(rErGrIr+rrrr�<module>s.
�