ó »ÏâIc@s†dZddlZddlZddlmZmZmZmZmZddlm Z de fd„ƒYZ de fd„ƒYZ dS( s&CherryPy Application and Tree objects.iÿÿÿÿN(t _cpconfigt _cploggingt _cprequestt_cpwsgittools(thttpt ApplicationcBsêeZdZejZdZdZiZ dZ e j ƒZ iejd6ZdZdZdZdZejZejZeZddd„Zd„Zd Zd „Zd „Ze d ed edeƒZ!d„Z"d„Z#d„Z$d„Z%RS(s%A CherryPy Application. Servers and gateways should not instantiate Request objects directly. Instead, they should ask an Application object for a request object. An instance of this class may also be used as a WSGI callable (WSGI application object) for itself. s= The top-most container of page handlers for this app. Handlers should be arranged in a hierarchy of attributes, matching the expected URI hierarchy; the default dispatcher then searches this hierarchy for a matching handler. When using a dispatcher other than the default, this value may be None.sc A dict of {path: pathconf} pairs, where 'pathconf' is itself a dict of {key: value} pairs.Rs&A LogManager instance. See _cplogging.s"A CPWSGIApp instance. See _cpwsgi.tcs¯tjtˆƒtjjƒˆ_|ˆ_|ˆ_tj ˆƒˆ_ ˆj j ƒˆ_ ‡fd†ˆj d<ˆj j ˆj d<ˆjjj ƒˆ_|r«ˆj|ƒndS(Ncstˆj||ƒS(N(tsetattrtlog(tktv(tself(s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyt7sR twsgi(Rt LogManagertidtcherrypyR t logger_roottroott script_nameRt CPWSGIApptwsgiappt namespacestcopytnamespace_handlert __class__tconfigtmerge(R RRR((R s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyt__init__0s!  cCs#d|j|jj|j|jfS(Ns %s.%s(%r, %r)(t __module__Rt__name__RR(R ((s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyt__repr__>ssÖ The URI "mount point" for this app. A mount point is that portion of the URI which is constant for all URIs that are serviced by this application; it does not include scheme, host, or proxy ("virtual host") portions of the URI. For example, if script_name is "/my/cool/app", then the URL "http://www.example.com/my/cool/app/page1" might be handled by a "page1" method on the root object. The value of script_name MUST NOT end in a slash. If the script_name refers to the root of the URI, it MUST be an empty string (not "/"). If script_name is explicitly set to None, then the script_name will be provided for each call from request.wsgi_environ['SCRIPT_NAME']. cCs-|jdkr&tjjdjdƒS|jS(Nt SCRIPT_NAMEt/(t _script_nametNoneRtrequestt wsgi_environtrstrip(R ((s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyt_get_script_nameRscCs%|r|jdƒ}n||_dS(NR"(R'R#(R tvalue((s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyt_set_script_nameWstfgettfsettdoccCs3tj|j|ƒ|j|jjdiƒƒdS(s(Merge the given config into self.config.R"N(RRRRtget(R R((s6/usr/lib/python2.7/vendor-packages/cherrypy/_cptree.pyR^sc Cs—|j||||ƒ}||_x*|jjƒD]\}}||j|s   (|