/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/urlparser.pyo (22494B)
Ñò bòNc@s´dZddkZddkZddkZddkZyddkZWnej o eZnXddkl Z ddkl Z ddk l Z ddkl Z ddklZddk lZd efd „ƒYZd d d gZd efd„ƒYZd„Zeideƒd„Zeideƒd„Zd„Zd„Zeideƒd efd„ƒYZed„Zd efd„ƒYZdd„Zeeed„ZdS(sH WSGI applications that parse the URL and dispatch to on-disk resources iÿÿÿÿN(trequest(tfileapp(t import_string(thttpexceptions(tETAG(t converterst NoDefaultcBseZRS((t__name__t __module__(((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRst URLParsertStaticURLParsertPkgResourcesParsercBsžeZdZhZeZhZeeed d„Zd„Z d„Z d d„Z d„Z d„Z d„Zd„ZeeƒZd „Zd „Zd „ZRS( s WSGI middleware Application dispatching, based on URL. An instance of `URLParser` is an application that loads and delegates to other applications. It looks for files in its directory that match the first part of PATH_INFO; these may have an extension, but are not required to have one, in which case the available files are searched to find the appropriate file. If it is ambiguous, a 404 is returned and an error logged. By default there is a constructor for .py files that loads the module, and looks for an attribute ``application``, which is a ready application object, or an attribute that matches the module name, which is a factory for building applications, and is called with no arguments. URLParser will also look in __init__.py for special overrides. These overrides are: ``urlparser_hook(environ)`` This can modify the environment. Its return value is ignored, and it cannot be used to change the response in any way. You *can* use this, for example, to manipulate SCRIPT_NAME/PATH_INFO (try to keep them consistent with the original URL -- but consuming PATH_INFO and moving that to SCRIPT_NAME is ok). ``urlparser_wrap(environ, start_response, app)``: After URLParser finds the application, it calls this function (if present). If this function doesn't call ``app(environ, start_response)`` then the application won't be called at all! This can be used to allocate resources (with ``try:finally:``) or otherwise filter the output of the application. ``not_found_hook(environ, start_response)``: If no file can be found (*in this directory*) to match the request, then this WSGI application will be called. You can use this to change the URL and pass the request back to URLParser again, or on to some other application. This doesn't catch all ``404 Not Found`` responses, just missing files. ``application(environ, start_response)``: This basically overrides URLParser completely, and the given application is used for all requests. ``urlparser_wrap`` and ``urlparser_hook`` are still called, but the filesystem isn't searched in any way. c KsÑ|o ddk} | idtƒnh}tiidjo|itiidƒ}n||_||_|t jo|i ddƒ}nt i |ƒ|_ |t jo|i d dƒ}nt i |ƒ|_|t jo|i ddƒ}nt i |ƒ|_|iiƒ|_|o|ii|ƒnx|iƒD]‚\} } | idƒptd| | fƒ‚n| tdƒiƒ} t| ttfƒoti| ƒ} n| |i| ¼s*   "     cCs2tidti|ƒd|ƒ}|i||ƒS(Ns%The resource at %s could not be foundtcomment(Rt HTTPNotFoundRt construct_urltwsgi_application(R,RCRDt debug_messagetexc((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRAÖs  cCswti|dtƒ}|d7}|idƒo|d|d7}ntid|dd|fgƒ}|i||ƒS(s^ This happens when you try to get to a directory without a trailing / twith_query_stringR t QUERY_STRINGt?sFThe resource has moved to %s - you should be redirected automatically.theaderstlocation(RRRtFalseRRtHTTPMovedPermanentlyRS(R,RCRDturlRU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR;Ýs cCs3g}x¿ti|iƒD]«}tii|ƒ\}}tii|i|ƒ}||ijp| oqn||jo|i|ƒqn||ijoqn||jo|i|ƒqqW|pdSt |ƒdjoD||jo|S|di dt i |ƒdi|ƒfƒdS|dS(Nis wsgi.errorss$Ambiguous URL: %s; matches files %s s, i(RtlistdirRRtsplitextR@RtappendRR=R&RBRRR(R,RCt base_filenametpossibleRItbaseR1t full_filename((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRLìs4      cCstii|ƒo d}ntii|ƒd}|ii||iidƒƒ}|djo|S||||ƒ}|djon|S(Ntdirit*(RRtisdirR_R!RR=(R,RCRIttt constructortapp((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRMs !  cCs|i}|||(RqRRRthextabstid(R,((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyt__repr__Ns  N(RRt__doc__RoRR9RR=R2RKR>RAR;RLRMRnt classmethodRsR:Ry(((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR s&2 1 0    #     cCsQ|d}|o|dtii|ƒ7}ntii|ƒ}|i||ƒS(Ns paste.urlparser.base_python_namet.(RRtbasenameRs(RrRCRIR((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pytmake_directoryUs  RecCs ti|ƒS(N(RtFileApp(RrRCRI((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyt make_unknown_sRfcCs\|d}tiitii|ƒƒd}|o|d|}nt||||dƒS(Ns paste.urlparser.base_python_nameiR|s wsgi.errors(RRR_R}tload_module_from_name(RCRIRt module_name((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRuds  " c Cs¾tii|ƒo ti|Stiitii|ƒdƒ}tii|ƒppyt|dƒ}Wn?t t fj o-}|i dtii|ƒ|fƒdSX|i dƒ|i ƒnd}tii|ƒo ti|Sd|joTdi|idƒd ƒ}|idƒd} t|tii|ƒ||ƒ} n|} d}zFti| tii|ƒgƒ\}} } ti||| | ƒ} Wd|dj o|i ƒnX| S(Ns __init__.pytws5Cannot write __init__.py file into directory %s (%s) s# R|iÿÿÿÿ(tsystmodulesthas_keyRRR@tdirnameRttopentOSErrortIOErrorRBR=tclosetsplitRtimpt find_moduleRu(RCRIR‚terrorst init_filenametftetfpt parent_namet base_nametparenttpathnametstufftmodule((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRls< !   $ cCsÌt||ƒ}|pdSt|dƒo!|iot|id|iƒS|iidƒd}t||ƒo;t||ƒ}t|dƒo|iSt||ƒƒSn|did||fƒdS(NRHRSR|iÿÿÿÿs wsgi.errorss'Cound not find application or %s in %s ( RuR=thasattrRHR<RRŒRSRB(RrRCRIR™R•tobj((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pytmake_pyŽs s.pycBskeZdZd d d„Zd„ZeeƒZd„Zd„Zd„Z d d„Z d„Z d„Z RS( s‹ Like ``URLParser`` but only serves static files. ``cache_max_age``: integer specifies Cache-Control max_age in seconds cCs8|i|ƒ|_|i|p|ƒ|_||_dS(N(tnormpathRtroot_directoryt cache_max_age(R,RRžRŸ((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR2¬scCstiitii|ƒƒS(N(RRtnormcasetabspath(R((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR²sc CsÓ|iddƒ}|p|i||ƒS|djo d}nti|ƒ}|itii|i|ƒƒ}|i |i ƒp|i ||ƒStii |ƒp|i ||ƒStii |ƒo)|i|d|i d|iƒ||ƒS|idƒo'|idƒdjo|i||ƒS|idƒ}|oTti|ƒi}t|ƒ|jo+g}ti||ƒ|d|ƒdgSn|i|ƒ} |io| id |iƒn| ||ƒS( NR3R4R s index.htmlRžRŸtHTTP_IF_NONE_MATCHs304 Not Modifiedtmax_age(RR;Rt path_info_popRRRR@RR$RžRARtRgRqRŸterror_extra_pathtstattst_mtimeR)RR"tmake_appt cache_control( R,RCRDRERItfullt if_none_matchtmytimeRYtfa((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRK¶s:  ! &   cCs ti|ƒS(N(RR(R,RI((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR¨ÜscCswti|dtƒ}|d7}|idƒo|d|d7}ntid|dd|fgƒ}|i||ƒS(s^ This happens when you try to get to a directory without a trailing / RVR RWRXsFThe resource has moved to %s - you should be redirected automatically.RYRZ(RRRR[RRR\RS(R,RCRDR]RU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR;ßs cCs^tidti|ƒdd|idƒ|idƒ|i|pdfƒ}|i||ƒS(Ns%The resource at %s could not be foundRPs6SCRIPT_NAME=%r; PATH_INFO=%r; looking in %r; debug: %sR6R3s(none)(RRQRRRRRRS(R,RCRDRTRU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRAîscCs'tid|dƒ}|i||ƒS(Ns#The trailing path %r is not allowedR3(RRQRS(R,RCRDRU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR¥÷scCsd|ii|ifS(Ns<%s %r>(RqRR(R,((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRyüsN( RRRzR=R2Rt staticmethodRKR¨R;RAR¥Ry(((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR £s    &   cCs-|dj ot|ƒ}nt|d|ƒS(s§ Return a WSGI application that serves a directory (configured with document_root) cache_max_age - integer specifies CACHE_CONTROL max_age in seconds RŸN(R=tintR (R-t document_rootRŸ((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyt make_staticÿs cBs5eZddd„Zd„Zd„Zdd„ZRS(cCs±tdjotdƒ‚nt|ttfƒoti|ƒ|_n ||_||_|djoti ƒ}n||_ |djo |}nt i i |ƒ|_dS(Ns"This class requires pkg_resources.(t pkg_resourcesR=tNotImplementedErrorR(R)R*tget_distributionteggt resource_nametResourceManagertmanagerRRRt root_resource(R,t egg_or_specR¶R¸R¹((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR2 s       cCs d|ii|ii|ifS(Ns<%s for %s:%r>(RqRRµt project_nameR¶(R,((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRys  c Cs |iddƒ}|p|i||ƒS|djo d}nti|ƒ}tiitii|id|ƒƒ}|i dj o%|i |i ƒ o|i ||ƒS|i i|ƒp|i ||ƒS|i i|ƒoL|i dj o |i p|i}|i|i ||id|ƒ||ƒS|idƒo'|idƒdjo|i||ƒSti|ƒ\}}|p d}ny|i i|i|ƒ} Wn;ttfj o)} tid| ƒ} | i||ƒSX|dd |fgƒti| ƒS( NR3R4R s index.htmlR¹sapplication/octet-streams,You are not permitted to view this file (%s)s200 OKs content-type(RR;RR¤RRR RR¶R¹R=R$RARµt has_resourcetresource_isdirRqR¸R¥t mimetypest guess_typetget_resource_streamRŠR‰Rt HTTPForbiddenRSRt _FileIter( R,RCRDRERItresourcet child_rootttypetencodingtfileR’RU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRK"s>  $ &  c Csdtidti|ƒdd|idƒ|idƒ|i|i|pdfƒ}|i||ƒS(Ns%The resource at %s could not be foundRPs=SCRIPT_NAME=%r; PATH_INFO=%r; looking in egg:%s#%r; debug: %sR6R3s(none)(RRQRRRRRµR¶RS(R,RCRDRTRU((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyRAIs N(RRR=R2RyRKRA(((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyR s  'R4cCs*tdjotdƒ‚nt||ƒS(s A static file parser that loads data from an egg using ``pkg_resources``. Takes a configuration value ``egg``, which is an egg spec, and a base ``resource_name`` (default empty string) which is the path in the egg that this starts at. s%This function requires pkg_resources.N(R²R=R³R (R-RµR¶((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pytmake_pkg_resourcesRs c Ks»|d jo|idd ƒ}nti|ƒ}|d jo|idd ƒ}nti|ƒ}|d jo|id dƒ}nti|ƒ}th||d|d|d ||S(s­ Create a URLParser application that looks in ``directory``, which should be the directory for the Python package named in ``base_python_name``. ``index_names`` are used when viewing the directory (like ``'index'`` for ``'index.html'``). ``hide_extensions`` are extensions that are not viewable (like ``'.pyc'``) and ``ignore_extensions`` are viewable but only if an explicit extension is given. R RRRRRs.pyctbakspy~RN(sindexsIndexsmainsMain(s.pycRÉspy~((R=RRRR (R-RRR RRR.((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pytmake_url_parser]s"   ( RzRR„RR¾R²t ImportErrorR=tpasteRRt paste.utilRRt httpheadersRRtobjectRt__all__R R~RnR€RuRRœR R±R RÈRÊ(((s@/opt/alt/python37/lib/python3.7/site-packages/paste/urlparser.pyts@     ÿ;    " \ G