Changeset 1055
- Timestamp:
- 04/22/06 13:05:04
- Files:
-
- trunk/cherrypy/_cprequest.py (modified) (2 diffs)
- trunk/cherrypy/config.py (modified) (1 diff)
- trunk/cherrypy/lib/static.py (modified) (1 diff)
- trunk/cherrypy/lib/xmlrpc.py (modified) (3 diffs)
- trunk/cherrypy/test/test_combinedfilters.py (modified) (1 diff)
- trunk/cherrypy/test/test_xmlrpc_filter.py (modified) (1 diff)
- trunk/cherrypy/tools.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cprequest.py
r1050 r1055 234 234 def main(self, path=None): 235 235 """Obtain and set cherrypy.response.body from a page handler.""" 236 if path is None: 237 path = self.object_path 236 238 dispatch = cherrypy.config.get("dispatcher") or Dispatcher() 237 239 handler = dispatch(path) … … 298 300 class Dispatcher(object): 299 301 300 def __call__(self, path =None):302 def __call__(self, path): 301 303 """Find the appropriate page handler.""" 302 304 request = cherrypy.request 303 if path is None:304 path = request.object_path305 306 305 handler, opath, vpath = self.find(request.browser_url, path) 307 306 trunk/cherrypy/config.py
r1047 r1055 27 27 'server.environment': "development", 28 28 29 '/favicon.ico': {' hooks.static.on': True,30 ' hooks.static.file': _favicon_path},29 '/favicon.ico': {'tools.staticfile.on': True, 30 'tools.staticfile.filename': _favicon_path}, 31 31 } 32 32 trunk/cherrypy/lib/static.py
r1052 r1055 7 7 import os 8 8 import re 9 import time 9 10 import urllib 10 11 trunk/cherrypy/lib/xmlrpc.py
r1047 r1055 3 3 4 4 import cherrypy 5 from cherrypy import _cprequest6 5 7 6 … … 36 35 using it via an extension, provide a true value for allow_none. 37 36 """ 37 from cherrypy import _cprequest 38 38 dispatch = cherrypy.config.get("dispatcher") or _cprequest.Dispatcher() 39 handler = dispatch(path)39 40 40 request = cherrypy.request 41 handler = dispatch(request.object_path) 41 42 body = handler(*(request.virtual_path + request.paramList), 42 43 **request.params) … … 62 63 def setup(conf): 63 64 """Hook this tool into cherrypy.request using the given conf.""" 64 cherrypy.request.hooks.attach('before_process_body', process_body, conf) 65 cherrypy.request.hooks.attach_main(main, conf) 65 cherrypy.request.hooks.attach('before_request_body', process_body, conf) 66 def wrapper(): 67 if main(**conf): 68 cherrypy.request.execute_main = False 69 cherrypy.request.hooks.attach('before_main', wrapper) 66 70 cherrypy.request.hooks.attach('after_error_response', error_response, conf) trunk/cherrypy/test/test_combinedfilters.py
r1017 r1055 19 19 'server.log_to_screen': False, 20 20 'server.environment': 'production', 21 ' gzip_filter.on': True,22 ' encoding_filter.on': True,21 'tools.gzip.on': True, 22 'tools.encode.on': True, 23 23 }) 24 24 trunk/cherrypy/test/test_xmlrpc_filter.py
r1017 r1055 60 60 'server.environment': 'production', 61 61 'server.show_tracebacks': True, 62 '/xmlrpc': {' xmlrpc_filter.on': True},62 '/xmlrpc': {'tools.xmlrpc.on': True}, 63 63 }) 64 64 trunk/cherrypy/tools.py
r1053 r1055 29 29 30 30 # These modules are themselves Tools 31 from cherrypy.lib import caching 31 from cherrypy.lib import caching, xmlrpc 32 32 33 33

