Changeset 1070
- Timestamp:
- 04/25/06 02:18:05
- Files:
-
- trunk/cherrypy/_cpengine.py (modified) (1 diff)
- trunk/cherrypy/_cputil.py (modified) (1 diff)
- trunk/cherrypy/lib/cptools.py (modified) (3 diffs)
- trunk/cherrypy/lib/tidy.py (modified) (2 diffs)
- trunk/cherrypy/lib/wsgiapp.py (modified) (1 diff)
- trunk/cherrypy/test/benchmark.py (modified) (2 diffs)
- trunk/cherrypy/tutorial/tut07_sessions.py (modified) (1 diff)
- trunk/cherrypy/tutorial/tut09_files.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpengine.py
r1047 r1070 73 73 cherrypy.profiler = None 74 74 75 # Initialize the built in filters76 ## filters.init()77 78 75 def start(self): 79 76 """Start the application server engine.""" trunk/cherrypy/_cputil.py
r1069 r1070 58 58 """Return the special attribute. A special attribute is one that 59 59 applies to all of the children from where it is defined, such as 60 _cp_ filters."""60 _cp_on_error.""" 61 61 62 62 # First, we look in the right-most object to see if this special trunk/cherrypy/lib/cptools.py
r1069 r1070 178 178 179 179 180 # Old filtercode180 # Tool code 181 181 182 182 def base_url(base=None, use_x_forwarded_host=True): … … 233 233 sess = getattr(cherrypy, "session", None) 234 234 if sess is None: 235 # Shouldn't this raise an error (if the session filterisn't enabled)?235 # Shouldn't this raise an error (if the sessions tool isn't enabled)? 236 236 return False 237 237 … … 240 240 241 241 ## conf = cherrypy.config.get 242 ## if conf(' static_filter.on', False):242 ## if conf('tools.staticfile.on', False) or conf('tools.staticdir.on', False): 243 243 ## return 244 244 if request.path.endswith('login_screen'): trunk/cherrypy/lib/tidy.py
r1047 r1070 15 15 server would also crash) 16 16 """ 17 # the tidy filter, by its very nature it's not generator friendly,17 # the tidy tool, by its very nature it's not generator friendly, 18 18 # so we just collapse the body and work with it. 19 19 originalBody = cherrypy.response.collapse_body() … … 94 94 95 95 def nsgmls(temp_dir, nsgmls_path, catalog_path, errors_to_ignore=None): 96 # the tidy filter, by its very nature it's not generator friendly,96 # the tidy tool, by its very nature it's not generator friendly, 97 97 # so we just collect the body and work with it. 98 98 original_body = cherrypy.response.collapse_body() trunk/cherrypy/lib/wsgiapp.py
r1047 r1070 1 """a WSGI application filterfor CherryPy"""1 """a WSGI application tool for CherryPy""" 2 2 3 3 import sys trunk/cherrypy/test/benchmark.py
r1047 r1070 70 70 }, 71 71 '/static': { 72 ' static_filter.on': True,73 ' static_filter.dir': 'static',74 ' static_filter.root': curdir,72 'tools.staticdir.on': True, 73 'tools.staticdir.dir': 'static', 74 'tools.staticdir.root': curdir, 75 75 }, 76 76 } … … 257 257 258 258 print 259 print ("Client Thread Report (1000 requests, 14 bytes via static _filter, "259 print ("Client Thread Report (1000 requests, 14 bytes via staticdir, " 260 260 "%s server threads):" % cherrypy.config.get('server.thread_pool')) 261 261 print_report(thread_report("%s/static/index.html" % MOUNT_POINT)) trunk/cherrypy/tutorial/tut07_sessions.py
r856 r1070 29 29 30 30 cherrypy.root = HitCounter() 31 cherrypy.config.update({' session_filter.on': True})31 cherrypy.config.update({'tools.sessions.on': True}) 32 32 33 33 if __name__ == '__main__': trunk/cherrypy/tutorial/tut09_files.py
r1047 r1070 33 33 your file. Note that the "name" argument is ignored if you don't also 34 34 provide a "disposition" (usually "attachement"). You can manually set 35 "contentType", but be aware that if you also use the EncodingFilter, it35 "contentType", but be aware that if you also use the encoding tool, it 36 36 may choke if the file extension is not recognized as belonging to a known 37 37 Content-Type. Setting the contentType to "application/x-download" works

