/opt/alt/python37/lib/python3.7/site-packages/paste
NameSizeModeActions
auth/-0755rm
cowbell/-0755rm
debug/-0755rm
evalexception/-0755rm
exceptions/-0755rm
util/-0755rm
__pycache__/-0755rm
cascade.py45080644editdlrm
cascade.pyc44750644editdlrm
cascade.pyo44750644editdlrm
cgiapp.py95900644editdlrm
cgiapp.pyc85540644editdlrm
cgiapp.pyo83370644editdlrm
cgitb_catcher.py37520644editdlrm
cgitb_catcher.pyc38510644editdlrm
cgitb_catcher.pyo38510644editdlrm
config.py43120644editdlrm
config.pyc52840644editdlrm
config.pyo52840644editdlrm
errordocument.py137770644editdlrm
errordocument.pyc130800644editdlrm
errordocument.pyo130800644editdlrm
fileapp.py136080644editdlrm
fileapp.pyc133520644editdlrm
fileapp.pyo132180644editdlrm
fixture.py579920644editdlrm
fixture.py.stdlib580750644editdlrm
fixture.pyc607260644editdlrm
fixture.pyo584530644editdlrm
flup_session.py39410644editdlrm
flup_session.pyc39590644editdlrm
flup_session.pyo39590644editdlrm
gzipper.py36920644editdlrm
gzipper.pyc45780644editdlrm
gzipper.pyo45780644editdlrm
httpexceptions.py242220644editdlrm
httpexceptions.pyc283800644editdlrm
httpexceptions.pyo276230644editdlrm
httpheaders.py430900644editdlrm
httpheaders.pyc452740644editdlrm
httpheaders.pyo439740644editdlrm
httpserver.py556620644editdlrm
httpserver.pyc486610644editdlrm
httpserver.pyo479990644editdlrm
lint.py149990644editdlrm
lint.pyc178890644editdlrm
lint.pyo137720644editdlrm
modpython.py79760644editdlrm
modpython.pyc89530644editdlrm
modpython.pyo89530644editdlrm
pony.py22790644editdlrm
pony.pyc27530644editdlrm
pony.pyo27530644editdlrm
progress.py81620644editdlrm
progress.pyc94160644editdlrm
progress.pyo94160644editdlrm
proxy.py101810644editdlrm
proxy.pyc87870644editdlrm
proxy.pyo87870644editdlrm
recursive.py146640644editdlrm
recursive.pyc181410644editdlrm
recursive.pyo178160644editdlrm
registry.py221930644editdlrm
registry.pyc229410644editdlrm
registry.pyo229410644editdlrm
reloader.py60100644editdlrm
reloader.pyc61340644editdlrm
reloader.pyo61340644editdlrm
request.py141450644editdlrm
request.pyc140650644editdlrm
request.pyo139690644editdlrm
response.py76590644editdlrm
response.pyc94680644editdlrm
response.pyo93840644editdlrm
session.py113350644editdlrm
session.pyc120530644editdlrm
session.pyo120530644editdlrm
transaction.py43620644editdlrm
transaction.pyc58570644editdlrm
transaction.pyo58570644editdlrm
translogger.py48120644editdlrm
translogger.pyc43740644editdlrm
translogger.pyo43740644editdlrm
url.py146240644editdlrm
url.pyc185810644editdlrm
url.pyo185810644editdlrm
urlmap.py90320644editdlrm
urlmap.pyc97730644editdlrm
urlmap.pyo96250644editdlrm
urlparser.py264240644editdlrm
urlparser.pyc226700644editdlrm
urlparser.pyo224940644editdlrm
wsgilib.py201340644editdlrm
wsgilib.pyc222360644editdlrm
wsgilib.pyo221800644editdlrm
wsgiwrappers.py221650644editdlrm
wsgiwrappers.pyc244500644editdlrm
wsgiwrappers.pyo244500644editdlrm
Edit: /opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyc (24450B)
bNc@sdZddkZddkZddklZddklZddklZl Z l Z l Z ddk l Z lZddklZddklZdd klZdd klZdd klZd d gZeideiZdefdYZedeZde fdYZ!d e fdYZ"d e fdYZ#h*dd6dd6dd6dd6dd6d d!6d"d#6d$d%6d&d'6d(d)6d*d+6d,d-6d.d/6d0d16d2d36d4d56d6d76d8d96d:d;6d<d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6dLdM6dNdO6dPdQ6dRdS6dTdU6dVdW6dXdY6dZd[6d\d]6d^d_6d`da6dbdc6ddde6dfdg6dhdi6Z$dS(jsWSGI Wrappers for a Request and Response The WSGIRequest and WSGIResponse objects are light wrappers to make it easier to deal with an incoming request and sending a response. iN(tpformat(t SimpleCookie(tEnvironHeaderstget_cookie_dicttparse_dict_querystringtparse_formvars(t MultiDicttUnicodeMultiDict(tStackedObjectProxy(t HeaderDict(tencode_unicode_app_iter(tACCEPT_LANGUAGE(tdesired_matchest WSGIRequestt WSGIResponses;\s*charset=([^;]*)tDeprecatedSettingscBseZdZRS(cCs7tidtdtii|ti||dS(Nsepaste.wsgiwrappers.settings is deprecated: Please use paste.wsgiwrappers.WSGIRequest.defaults insteadi(twarningstwarntDeprecationWarningRtdefaultst _push_objectR(tselftobj((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyRs  (t__name__t __module__R(((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyRstdefaulttenviron_gettercBs2eZdZdddZddZdZRS(s5For delegating an attribute to a key in self.environ.tcCs||_||_||_dS(N(tkeyRtdefault_factory(RRRR((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt__init__'s  cCsg|djo|S|i|ijo4|io|i}|i|i<|S|iSn|i|iS(N(tNoneRtenvironRR(RRttypetval((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt__get__+s   cCs d|iS(Ns(R(R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt__repr__6sN(RRt__doc__RRR#R$(((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyR$s c BseZdZededddddeddZdZe d Z e d Z e d Z e d Z e d ZdZeedeiZdZeedeiZdZeedeiZdZeedeiZdZdZeedeiZdZdZeedeiZdZeedeiZdZeedeiZdZdZdZRS(s#WSGI Request API Object This object represents a WSGI request with a more friendly interface. This does not expose every detail of the WSGI environment, and attempts to express nothing beyond what is available in the environment dictionary. The only state maintained in this object is the desired ``charset``, its associated ``errors`` handler, and the ``decode_param_names`` option. The incoming parameter values will be automatically coerced to unicode objects of the ``charset`` encoding when ``charset`` is set. The incoming parameter names are not decoded to unicode unless the ``decode_param_names`` option is enabled. When unicode is expected, ``charset`` will overridden by the the value of the ``Content-Type`` header's charset parameter if one was specified by the client. The class variable ``defaults`` specifies default values for ``charset``, ``errors``, and ``langauge``. These can be overridden for the current request via the registry. The ``language`` default value is considered the fallback during i18n translations to ensure in odd cases that mixed languages don't occur should the ``language`` file contain the string but not another language in the accepted languages list. The ``language`` value only applies when getting a list of accepted languages from the HTTP Accept header. This behavior is duplicated from Aquarium, and may seem strange but is very useful. Normally, everything in the code is in "en-us". However, the "en-us" translation catalog is usually empty. If the user requests ``["en-us", "zh-cn"]`` and a translation isn't found for a string in "en-us", you don't want gettext to fallback to "zh-cn". You want it to just use the string itself. Hence, if a string isn't found in the ``language`` catalog, the string in the source code will be used. *All* other state is kept in the environment dictionary; this is essential for interoperability. You are free to subclass this object. Rtcharsetterrorstreplacetdecode_param_namestlanguagesen-uscCs||_t||_|ii}|id|_|io$|i}|o ||_qgn|idd|_|idt |_ d|_ dS(NR&R'tstrictR)( R RtheadersRt _current_objtgetR&tdetermine_browser_charsetR'tFalseR)Rt _languages(RR Rtbrowser_charset((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyRis   s wsgi.inputswsgi.url_schemetREQUEST_METHODt SCRIPT_NAMEt PATH_INFOcCsDd|ijo |idSd|ijo|iddShSdS(sc Return any variables matched in the URL (e.g., ``wsgiorg.routing_args``). s paste.urlvarsswsgiorg.routing_argsiN(R (R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyturlvarss  tdoccCs|iidddjS(sEReturns a boolean if X-Requested-With is present and a XMLHttpRequesttHTTP_X_REQUESTED_WITHRtXMLHttpRequest(R R.(R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytis_xhrscCs|iid|iidS(s>Host name provided in HTTP_HOST, with fall-back to SERVER_NAMEt HTTP_HOSTt SERVER_NAME(R R.(R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pythostscCs|idj o|iS|iid}ti|i}|iidd}|p|S||jo|i|n|i|}g||d)||_|iS(slReturn a list of preferred languages, most preferred first. The list may be empty. tHTTP_ACCEPT_LANGUAGER*sen-usiN( R1RR R.R tparseRtappendtindex(RtacceptLanguagetlangstfallbackRA((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt languagess  cCs t|iS(N(RR (R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt_GETscCsE|i}|io+t|d|id|id|i}n|S(s Dictionary-like object representing the QUERY_STRING parameters. Always present, if possibly empty. If the same key is present in the query string multiple times, a list of its values can be retrieved from the ``MultiDict`` via the ``getall`` method. Returns a ``MultiDict`` container or a ``UnicodeMultiDict`` when ``charset`` is set. tencodingR't decode_keys(RFR&RR'R)(Rtparams((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytGETs   cCst|idtS(Ntinclude_get_vars(RR R0(R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt_POSTscCsE|i}|io+t|d|id|id|i}n|S(skDictionary-like object representing the POST body. Most values are encoded strings, or unicode strings when ``charset`` is set. There may also be FieldStorage objects representing file uploads. If this is not a POST request, or the body is not encoded fields (e.g., an XMLRPC request) then this will be empty. This will consume wsgi.input when first accessed if applicable, but the raw version will be put in environ['paste.parsed_formvars']. Returns a ``MultiDict`` container or a ``UnicodeMultiDict`` when ``charset`` is set. RGR'RH(RLR&RR'R)(RRI((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytPOSTs    cCsht}|i|i|i|i|io+t|d|id|id|i}n|S(sDictionary-like object of keys from POST, GET, URL dicts Return a key value from the parameters, they are checked in the following order: POST, GET, URL Additional methods supported: ``getlist(key)`` Returns a list of all the values by that key, collected from POST, GET, URL dicts Returns a ``MultiDict`` container or a ``UnicodeMultiDict`` when ``charset`` is set. RGR'RH(RtupdateRLRFR&RR'R)(RRI((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyRIs   cCs t|iS(szDictionary of cookies keyed by cookie name. Just a plain dictionary, may be empty but not None. (RR (R((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytcookiesscCs7ti|iidd}|o|idSdS(s Determine the encoding as specified by the browser via the Content-Type's charset parameter, if one is set s Content-TypeRiN(t _CHARSET_REtsearchR,R.tgroup(Rt charset_match((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyR/scCst||iiddS(sqReturn a list of specified mime-types that the browser's HTTP Accept header allows in the order provided.t HTTP_ACCEPTs*/*(R R R.(Rt mimetypes((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt match_acceptscCs t}d|ii|iit|||if}|d||i||i||i||i f7}|d||i 7}|i o*|d||i ||i f7}n|d||i 7}|d||i7}|d||i7}|S(s,Show important attributes of the WSGIRequests <%s.%s object at 0x%x method=%s,s2 scheme=%s, host=%s, script_name=%s, path_info=%s,s languages=%s,s charset=%s, errors=%s,s GET=%s,s POST=%s,s cookies=%s>(Rt __class__RRtidtmethodtschemeR=t script_namet path_infoRER&R'RJRMRO(Rtpftmsg((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyR$s$ N(RRR%RtdictRR0RRRtbodyRZRYR[R\R6tpropertyR:R=RERFRJRLRMRIROR/RVR$(((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyR 9s>,                  c Bs\eZdZededddddddhd d 6Zd d$d d ZdZdZ dZ dZ d d$d$dd$d$d$dZ dd$dZ dZededdZdZdZdZdZdZdZdZd ZeeeedeiZd!Zd"Zd#ZeeeedeiZRS(%sA basic HTTP response with content, headers, and out-bound cookies The class variable ``defaults`` specifies default values for ``content_type``, ``charset`` and ``errors``. These can be overridden for the current request via the registry. Rt content_types text/htmlR&sutf-8R'R+R,sno-caches Cache-ControlRicCsd|_t|_||_t|_t|_||_ |i i }|p@|i dd}|i d}|od||f}qn|ii |i dh||id<|i dd|_dS( NRbs text/htmlR&s%s; charset=%sR,s Content-TypeR'R+(Rt_itertTruet _is_str_itertcontentR R,RROt status_codeRR-R.RNR'(RRftmimetypetcodeRR&((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyR,s       cCs{|iodi|i}nt|i}dig}|iiD]\}}|d||fqL~d|S(sReturns a rendition of the full HTTP message, including headers. When the content is an iterator, the actual content is replaced with the output of str(iterator) (to avoid exhausting the iterator). Rs s%s: %ss (Retjoint get_contenttstrRfR,t headeritems(RRft_[1]Rtvalue((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt__str__?s csti}di|f}ii}x6iiD]%}|id|iddfq?W|||ti t }d|jo|o|di S|ot fddSi S(sConvenience call to return output and set status information Conforms to the WSGI interface for calling purposes only. Example usage: .. code-block:: python def wsgi_app(environ, start_response): response = WSGIResponse() response.write("Hello world") response.headers['Content-Type'] = 'latin1' return response(environ, start_response) s%s %ss Set-CookietheaderRswsgi.file_wrappercs iiS((Rftread((R(sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytgs( tSTATUS_CODE_TEXTRgR,RmROtvaluesR@toutputt isinstanceRftfiletiterRk(RR tstart_responset status_texttstatustresponse_headerstctis_file((RsC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt__call__Ms # cCs7ti|iidd}|o|idSdS(st Determine the encoding as specified by the Content-Type's charset parameter, if one is set s Content-TypeRiN(RPRQR,R.RR(RRS((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pytdetermine_charsetjscCs#tidtd|ii|S(s5 Case-insensitive check for a header sOWSGIResponse.has_header is deprecated, use WSGIResponse.headers.has_key insteadi(RRRR,thas_key(RRq((sC/opt/alt/python37/lib/python3.7/site-packages/paste/wsgiwrappers.pyt has_headerss t/c Cs||i|sz  "