Your IP : 18.118.144.50


Current Path : /opt/alt/python312/lib64/python3.12/wsgiref/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/wsgiref/__pycache__/headers.cpython-312.opt-2.pyc

�

�Q�fn��N�	ddlZejd�Zdd�ZGd�d�Zy)�Nz[ \(\)<>@,;:\\"/\[\]\?=]c��	|�Vt|�dkDrH|stj|�r*|jdd�jdd�}|�d|�d�S|�d|��S|S)Nr�\z\\�"z\"z="�=)�len�	tspecials�search�replace)�param�value�quotes   �6/opt/alt/python312/lib64/python3.12/wsgiref/headers.py�_formatparamr
sa���
��S��Z�!�^��I�$�$�U�+��M�M�$��/�7�7��U�C�E� %�u�-�-�#�U�+�+���c�x�eZdZ	dd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
dd
�Zd�Zd�Z
d
�Zd�Zd�Zd�Zd�Zd�Zy)�HeadersNc�V�|�|ng}t|�turtd��||_y)Nz+Headers must be a list of name/value tuples)�type�list�	TypeError�_headers�_convert_string_type)�self�headers�k�vs    r�__init__zHeaders.__init__s0��$�0�'�b����=��$��I�J�J���
�rc�p�	t|�tur|Stdjt	|����)Nz1Header names/values must be of type str (got {0}))r�str�AssertionError�format�repr)rrs  rrzHeaders._convert_string_type)s6��'���;�#���L��%�%+�V�D��K�%8�:�	:rc�.�	t|j�S�N)rr�rs r�__len__zHeaders.__len__0s��G��4�=�=�!�!rc��	||=|jj|j|�|j|�f�yr$)r�appendr)r�name�vals   r�__setitem__zHeaders.__setitem__4s=��(���J��
�
���
�
&�
&�t�
,�d�.G�.G��.L�M�	Orc���	|j|j��}|jD�cgc]}|dj�|k7s�|��c}|jddycc}w)Nr�r�lowerr�rr)�kvs   r�__delitem__zHeaders.__delitem__:sT��	��(�(�����6��)-���P��2�"�Q�%�+�+�-�4�:O�B��P��
�
�a���Ps�A �A c�&�	|j|�Sr$��get�rr)s  r�__getitem__zHeaders.__getitem__Bs��	��x�x��~�rc�*�	|j|�duSr$r3r5s  r�__contains__zHeaders.__contains__Ms��=��x�x��~�T�)�)rc��	|j|j��}|jD�cgc]}|dj�|k(s�|d�� c}Scc}w)Nr�r-r/s   r�get_allzHeaders.get_allRsP��	��(�(�����6�� $�
�
�E�
�"��A������1D��1��
�E�E��Es�A�Ac��	|j|j��}|jD]\}}|j�|k(s�|cS|Sr$r-)rr)�defaultrrs     rr4zHeaders.get^sF��H��(�(�����6���=�=�C�A�a��w�w�y�$����!��rc�N�	|jD��cgc]\}}|��	c}}Scc}}wr$�r�rrrs   r�keyszHeaders.keysg�)��	�#�m�m�,�m�d�a���m�,�,��,��!c�N�	|jD��cgc]\}}|��	c}}Scc}}wr$r?r@s   r�valueszHeaders.valuesqrBrCc�"�	|jddSr$r?r%s r�itemsz
Headers.items{s��	��}�}�Q��rc�N�|jj�d|j�d�S)N�(�))�	__class__�__name__rr%s r�__repr__zHeaders.__repr__�s���>�>�2�2�D�M�M�B�Brc�p�	dj|jD�cgc]}d|z��	c}ddgz�Scc}w)Nz
z%s: %s�)�joinr)rr0s  r�__str__zHeaders.__str__�s9��	2��{�{�D�M�M�B�M�b�H�r�M�M�B�B�r�7�J�K�K��Bs�3c�6�t|�jd�S)Nz
iso-8859-1)r�encoder%s r�	__bytes__zHeaders.__bytes__�s���4�y����-�-rc��	|j|�}|�=|jj|j|�|j|�f�|S|Sr$)r4rr(r)rr)r�results    r�
setdefaultzHeaders.setdefault�sW��	����$����>��M�M� � �$�";�";�D�"A��)�)�%�0�"2�
3��L��Mrc	���	g}|�"|j|�}|j|�|j�D]v\}}|j|�}|�"|j|jdd���;|j|�}|jt	|jdd�|���x|j
j|j|�dj
|�f�y)N�_�-z; )rr(rGr
rrrP)r�_name�_value�_params�partsrrs       r�
add_headerzHeaders.add_header�s���	������.�.�v�6�F��L�L�� ��M�M�O�D�A�q��)�)�!�,�A��y����Q�Y�Y�s�C�0�1��-�-�a�0�����\�!�)�)�C��*=�q�A�B�
$�	
�
�
���d�7�7��>��	�	�%�@P�Q�Rrr$)rL�
__module__�__qualname__rrr&r+r1r6r8r;r4rArErGrMrQrTrWr_�rrrrs`��6�-�:�"�O�Q�	�*�
	F��-�-� �C�L�
.��Srr)Nr:)�re�compilerrrrbrr�<module>res3���
��B�J�J�2�3�	��\S�\Sr

?>