Ñò ô†³Kc@szdZddkZdefd„ƒYZd„Zd„Zd„Zd„Zed „Z ded „Z ded „Z dS( s#Routines to generate WSGI responsesiÿÿÿÿNt HeaderDictcBs’eZdZd„Zd„Zd„Zd„ZeZd d„Z d d„Z d„Z d„Z d „Z d „Zd „Zd „ZeeƒZRS(sI 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. cCsti||i|ƒƒS(N(tdictt __getitem__t normalize(tselftkey((s2/usr/lib/python2.6/site-packages/paste/response.pyRscCs ti||i|ƒ|ƒdS(N(Rt __setitem__R(RRtvalue((s2/usr/lib/python2.6/site-packages/paste/response.pyR scCsti||i|ƒƒdS(N(Rt __delitem__R(RR((s2/usr/lib/python2.6/site-packages/paste/response.pyR#scCsti||i|ƒƒS(N(Rt __contains__R(RR((s2/usr/lib/python2.6/site-packages/paste/response.pyR &scCsti||i|ƒ|ƒS(N(RtgetR(RRtfailobj((s2/usr/lib/python2.6/site-packages/paste/response.pyR +scCsti||i|ƒ|ƒS(N(Rt setdefaultR(RRR ((s2/usr/lib/python2.6/site-packages/paste/response.pyR .scCsti||i|ƒƒS(N(RtpopR(RR((s2/usr/lib/python2.6/site-packages/paste/response.pyR 1scCs,x%|D]}||||i|ƒ %(error_code)s

%(error_code)s

%(message)s t error_codetmessage(twarningstwarntDeprecationWarning(R3R4t__warn((s2/usr/lib/python2.6/site-packages/paste/response.pyterror_body_response¨s cCs“|otidtdƒn|o.|idhƒidƒo|d|7}nt||dtƒ}d d tt|ƒƒfg}|||fS( sg Returns the status, headers, and body of an error response. Use like: .. code-block:: python status, headers, body = wsgilib.error_response( '301 Moved Permanently', 'Moved to %s' % (url, url)) start_response(status, headers) return [body] **Note:** Deprecated shwsgilib.error_response is deprecated; use the wsgi_application method on an HTTPException object insteadis paste.configtdebugs R8s content-types text/htmlscontent-length(s content-types text/html(R5R6R7R R9R&RR.(tenvironR3R4t debug_messageR8tbodyR'((s2/usr/lib/python2.6/site-packages/paste/response.pyterror_responseÁs#cs7|otidtdƒn‡‡‡fd†}|S(sW An application that emits the given error response. **Note:** Deprecated slwsgilib.error_response_app is deprecated; use the wsgi_application method on an HTTPException object insteadics;t|ˆˆdˆdtƒ\}}}|||ƒ|gS(NR<R8(R>R&(R;tstart_responsetstatusR'R=(R<R4R3(s2/usr/lib/python2.6/site-packages/paste/response.pyt applicationês   (R5R6R7(R3R4R<R8RA((R<R4R3s2/usr/lib/python2.6/site-packages/paste/response.pyterror_response_appÞs ( R!R5RRR)R-R0R2R%R9R#R>RB(((s2/usr/lib/python2.6/site-packages/paste/response.pyts N