File: //opt/alt/python37/lib/python3.7/site-packages/paste/__pycache__/response.cpython-37.pyc
B
a�N� � @ s^ d Z ddlZG dd� de�Zdd� Zdd� Zd d
� Zdd� Zddd�Zddd�Z ddd�Z
dS )z#Routines to generate WSGI responses� Nc @ s� e Zd ZdZdd� Zdd� Zdd� Zdd � ZeZddd�Z dd
d�Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zee�Zd
S )�
HeaderDictaI
This represents response headers. It handles the headers as a
dictionary, with case-insensitive keys.
Also there is an ``.add(key, value)`` method, which sets the key,
or adds the value to the current value (turning it into a list if
necessary).
For passing to WSGI there is a ``.headeritems()`` method which is
like ``.items()`` but unpacks value that are lists. It also
handles encoding -- all headers are encoded in ASCII (if they are
unicode).
@@: Should that encoding be ISO-8859-1 or UTF-8? I'm not sure
what the spec says.
c C s t �| | �|��S )N)�dict�__getitem__� normalize)�self�key� r �?/opt/alt/python37/lib/python3.7/site-packages/paste/response.pyr s zHeaderDict.__getitem__c C s t �| | �|�|� d S )N)r �__setitem__r )r r �valuer r r r
s zHeaderDict.__setitem__c C s t �| | �|�� d S )N)r �__delitem__r )r r r r r r # s zHeaderDict.__delitem__c C s t �| | �|��S )N)r �__contains__r )r r r r r r
&