/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/request.pyo (13969B)
Ñò aòNc@s˜dZddkZddklZlZddklZddkZddkZyddkl Z Wn#e j oddk l Z nXddk l Z ddd d d d d ddg Zd„Zd„Zd„Zd„Zed„Zeedddd„Zd„Zd„Zd„Zhdd6dd6dd6Zd„Zde fd „ƒYZd!„Zeei_e d"joddk!Z!e!i"ƒndS(#sÑ This module provides helper routines with work directly on a WSGI environment to solve common requirements. * get_cookies(environ) * parse_querystring(environ) * parse_formvars(environ, include_get_vars=True) * construct_url(environ, with_query_string=True, with_path_info=True, script_name=None, path_info=None, querystring=None) * path_info_split(path_info) * path_info_pop(environ) * resolve_relative_url(url, environ) iÿÿÿÿN(t SimpleCookiet CookieError(tStringIO(t DictMixin(t MultiDictt get_cookiestget_cookie_dicttparse_querystringtparse_formvarst construct_urltpath_info_splitt path_info_poptresolve_relative_urltEnvironHeaderscCsŒ|iddƒ}|idƒo&|d\}}||jo|Sntƒ}y|i|ƒWntj onX||f|d<|S(sµ Gets a cookie object (which is a dictionary-like object) from the request environment; caches this value in case get_cookies is called again for the same request. t HTTP_COOKIEts paste.cookies(tgetthas_keyRtloadR(tenvirontheadertcookiest check_header((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR#s   cCs½|idƒ}|phS|idƒo&|d\}}||jo|Sntƒ}y|i|ƒWntj onXh}x|D]}||i||/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR7s$   cCs€|iddƒ}|pgSd|jo&|d\}}||jo|Snti|dtdtƒ}||f|d<|S(s< Parses a query string into a list like ``[(name, value)]``. Caches this value in case parse_querystring is called again for the same request. You can pass the result to ``dict()``, but be aware that keys that appear multiple times will be lost (only the last value will be preserved). t QUERY_STRINGRspaste.parsed_querystringtkeep_blank_valueststrict_parsing(Rtcgit parse_qsltTruetFalse(Rtsourcetparsedt check_source((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyRQs     cCs|iddƒ}|ptƒSd|jo&|d\}}||jo|Snti|dtdtƒ}t|ƒ}||f|d<|S(sÊParses a query string like parse_querystring, but returns a MultiDict Caches this value in case parse_dict_querystring is called again for the same request. Example:: >>> environ = {'QUERY_STRING': 'day=Monday&user=fred&user=jane'} >>> parsed = parse_dict_querystring(environ) >>> parsed['day'] 'Monday' >>> parsed['user'] 'fred' >>> parsed.getall('user') ['fred', 'jane'] RRspaste.parsed_dict_querystringRR(RRRRRR (RR!R"R#tmulti((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pytparse_dict_querystringhs     cCsB|d}d|joD|d\}}||jo#|o|it|ƒƒn|Sn|iddƒiƒ}d|jo|iddƒd}n|dj}|id ƒpd |d /opt/alt/python37/lib/python3.7/site-packages/paste/request.pyRˆs\                   c Cs7|dd}|idƒo¸|d}d}d|jot|iddƒ\}}|ddjo|djo d}q«q¯|ddjo|d jo d}q«q¯n||7}|o|d |7}qGnr||d 7}|ddjo+|d djo|d|d 7}qGn(|d d jo|d|d 7}n|djo#|ti|id dƒƒ7}n|ti|ƒ7}|oG|djo#|ti|iddƒƒ7}qØ|ti|ƒ7}n|oT|djo*|idƒo|d|d7}q/q3|o|d|7}q3n|S(s“Reconstructs the URL from the WSGI environment. You may override SCRIPT_NAME, PATH_INFO, and QUERYSTRING with the keyword arguments. swsgi.url_schemes://t HTTP_HOSTt:ithttpst443thttpt80s:%st SERVER_NAMEt SERVER_PORTt SCRIPT_NAMERt PATH_INFORt?N(RtNoneR-turllibtquote( Rtwith_query_stringtwith_path_infot script_namet path_infot querystringturlthosttport((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR ÈsF      # # cCs"t|dtƒ}ti||ƒS(s  Resolve the given relative URL as being relative to the location represented by the environment. This can be used for redirecting to a relative path. Note: if url is already absolute, this function will (intentionally) have no effect on it. RL(R R turlparseturljoin(RQRtcur_url((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR ús cCs]|pdS|idƒ}d|jo'|iddƒ\}}|d|fS|dfSdS(s Splits off the first segment of the path. Returns (first_part, rest_of_path). first_part can be None (if PATH_INFO is empty), '' (if PATH_INFO is '/'), or a name without any /'s. rest_of_path can be '' or a string starting with /. Rt/iN(NR(RItlstripR-(ROtfirsttrest((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR s cCsº|iddƒ}|pdSx/|idƒo|dcd7<|d}q!Wd|jo|dc|7>> def call_it(script_name, path_info): ... env = {'SCRIPT_NAME': script_name, 'PATH_INFO': path_info} ... result = path_info_pop(env) ... print 'SCRIPT_NAME=%r; PATH_INFO=%r; returns=%r' % ( ... env['SCRIPT_NAME'], env['PATH_INFO'], result) >>> call_it('/foo', '/bar') SCRIPT_NAME='/foo/bar'; PATH_INFO=''; returns='bar' >>> call_it('/foo/bar', '') SCRIPT_NAME='/foo/bar'; PATH_INFO=''; returns=None >>> call_it('/foo/bar', '/') SCRIPT_NAME='/foo/bar/'; PATH_INFO=''; returns='' >>> call_it('', '/1/2/3') SCRIPT_NAME='/1'; PATH_INFO='/2/3'; returns='1' >>> call_it('', '//1/2') SCRIPT_NAME='//1'; PATH_INFO='/2'; returns='1' RGRRWRFiN(RRIt startswithR-(Rtpathtsegment((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR s  t AuthorizationtHTTP_CGI_AUTHORIZATIONsContent-LengthR(s Content-TypeR&ccsvxo|iƒD]a\}}|tjot||fVq |idƒo%|diƒiddƒ|fVq q WdS(s‚ Parse the headers in the environment (like ``HTTP_HOST``) and yield a sequence of those (header_name, value) tuples. tHTTP_it_t-N(t iteritemst_parse_headers_specialR[ttitletreplace(Rtcgi_varR((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt parse_headersHs   cBs_eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z RS( sgAn object that represents the headers as present in a WSGI environment. This object is a wrapper (with no internal state) for a WSGI request object, representing the CGI-style HTTP_* keys as a dictionary. Because a CGI environment can only hold one value for each key, this dictionary is single-valued (unlike outgoing headers). cCs ||_dS(N(R(tselfR((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt__init___scCsNd|iddƒiƒ}|djo d}n|djo d}n|S(NR`RbRatHTTP_CONTENT_LENGTHR(tHTTP_CONTENT_TYPER&(Rftupper(RiRtkey((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt _trans_namebs     cCsW|djodS|djodS|idƒo|diddƒiƒSdSdS( NR&s Content-TypeR(sContent-LengthR`iRaRb(R[RfReRI(RiRn((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt _trans_keyjs  cCs|i|i|ƒS(N(RRo(Rititem((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt __getitem__tscCs||i|i|ƒ/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt __setitem__wscCs|i|i|ƒ=dS(N(RRo(RiRq((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt __delitem__{sccs=x6|iD]+}|i|ƒ}|dj o |Vq q WdS(N(RRpRI(RiRnR((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt__iter__~s   cCstt|ƒƒS(N(R0titer(Ri((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR1„scCs|i|ƒ|ijS(N(RoR(RiRq((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt __contains__‡s( t__name__t __module__t__doc__RjRoRpRrRsRtRuR1Rw(((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyR Ts        cCs9|iod|i|ifSd|i|i|ifS(sÛ monkey patch for FieldStorage.__repr__ Unbelievely, the default __repr__ on FieldStorage reads the entire file content instead of being sane about it. This is a simple replacement that doesn't do that sFieldStorage(%r, %r)sFieldStorage(%r, %r, %r)(tfileRR2R(Ri((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pyt_cgi_FieldStorage__repr__patchŠs  t__main__(#RzRtCookieRRRRTRJtUserDictRt ImportErrortpaste.util.UserDict24tpaste.util.multidictRt__all__RRRR%RRRIR R R R RdRhR R|R.t__repr__Rxtdoctestttestmod(((s>/opt/alt/python37/lib/python3.7/site-packages/paste/request.pytsD         @1  (  6