Server IP : 192.158.238.246 / Your IP : 18.191.86.218 Web Server : LiteSpeed System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64 User : jenniferflocom ( 1321) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.6/site-packages/asn1crypto/__pycache__/ |
Upload File : |
3 <O�X�! � @ s� d Z ddlmZmZmZmZ ddlmZ ddlZddl Z ddl Z ddlmZ ddl mZmZmZmZmZ e jdk r�dd lmZmZ dd lmZmZ nddlmZmZmZmZ dd � Zdd� Zdd� Zej de� ddd�Z!ddd�Z"dS )z� Functions to convert unicode IRIs into ASCII byte string URIs and back. Exports the following items: - iri_to_uri() - uri_to_iri() � )�unicode_literals�division�absolute_import�print_function)�idnaN� )�unwrap)�byte_cls�str_cls� type_name� bytes_to_list� int_types� )�urlsplit� urlunsplit)�quote�unquote)r �unquote_to_bytesr r c C s t | t�sttdt| ����d}tjdk r�| jd� r�| jd� r�d}tj d| �}|rt|j d�}d| t|�d� } t| �}|r�|| dd� } t |dd� �}nt| �}|dkr�t |j�}|j}|dk r�|jd �}t |jdd�}t |jdd�}|j}|dk �rt|�jd �}d} |dk �r>| |7 } |�r6| d| 7 } | d7 } |dk �rP| |7 } |dk �r�|dk�oj|dk} |dk�o||dk}| �r�| �r�| d| 7 } t |jdd�}t |jdd�} t |jdd�}| dk�r�|dk�r�|dk�r�d}|dk�r�d}t|| || |f�}t |t��r|jd�}|S )z� Normalizes and encodes a unicode IRI into an ASCII byte string URI :param value: A unicode string of an IRI :return: A byte string of the ASCII-encoded URI z@ value must be a unicode string, not %s N� � zhttp://zhttps://z ^[^:]*://r r r z!$&'()*+,;=)�safe�ascii� � :� @s https 80s httpss 443z/!$&'()*+,;=@:z/?!$&'()*+,;=@:� /� �latin1)r r ���)� isinstancer � TypeErrorr r �sys�version_info� startswith�re�match�group�lenr � _urlquote�scheme�hostname�encode�username�password�port�path�query�fragmentr )�valuer) Zreal_prefixZprefix_match�parsedr* r, r- r. �netlocZdefault_httpZ default_httpsr/ r0 r1 �output� r6 �/usr/lib/python3.6/_iri.py� iri_to_uri% sd " r8 c C s* t | t�sttdt| ����t| �}|j}|dk r<|jd�}t|j ddgd�}t|j ddgd�}|j}|rt|jd�}|j}|r�t |t � r�|jd�}d}|dk r�||7 }|r�|d| 7 }|d7 }|dk r�||7 }|dk r�|dt|� 7 }t|jd gd d�}t|jdd gd d�} t|j�} t|||| | f�S )z� Converts an ASCII URI byte string into a unicode IRI :param value: An ASCII-encoded byte string of the URI :return: A unicode string of the IRI z= value must be a byte string, not %s Nr �:�@)�remapr r �/T)r; �preserve�&�=)r r r r r r r) �decode�_urlunquoter, r- r* r. r r r/ r0 r1 r )r2 r3 r) r, r- r* r. r4 r/ r0 r1 r6 r6 r7 � uri_to_iriu s<