Your IP : 18.119.135.67
o
6��fn � @ s0 d dl Z e �d�Zddd�ZG dd� d�ZdS ) � Nz[ \(\)<>@,;:\\"/\[\]\?=]� c C sT |d ur(t |�dkr(|st�|�r"|�dd��dd�}d| |f S d| |f S | S )Nr �\z\\�"z\"z%s="%s"z%s=%s)�len� tspecials�search�replace)Zparam�valueZquote� r
�6/opt/alt/python310/lib64/python3.10/wsgiref/headers.py�_formatparam
s r c @ s� e Zd Z d$dd�Zdd� Zdd� Zdd � Zd
d� Zdd
� Zdd� Z dd� Z
d$dd�Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� ZdS )%�HeadersNc C s. |d ur|ng }t |�turtd��|| _d S )Nz+Headers must be a list of name/value tuples)�type�list� TypeError�_headers�_convert_string_type)�selfZheaders�k�vr
r
r �__init__ s
zHeaders.__init__c C s$ t |�tu r |S td�t|����)Nz1Header names/values must be of type str (got {0}))r �str�AssertionError�format�repr)r r r
r
r r ) s
�zHeaders._convert_string_typec C s t | j�S �N)r r �r r
r
r �__len__0 s
zHeaders.__len__c C s( | |= | j �| �|�| �|�f� d S r )r �appendr )r �name�valr
r
r �__setitem__4 s
�zHeaders.__setitem__c s2 | � � �� �� � fdd�| jD �| jd d �<