Changeset 892
- Timestamp:
- 12/29/05 10:53:08
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
- trunk/cherrypy/config.py (modified) (2 diffs)
- trunk/cherrypy/test/test_core.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r887 r892 300 300 return candidate, names[:i+1], names[i+1:-1] 301 301 302 # Not found at any node 303 if objectpath.endswith("favicon.ico"): 304 # Use CherryPy's default favicon.ico. If developers really, 305 # really want no favicon, they can make a dummy method 306 # that raises NotFound. 307 icofile = os.path.join(os.path.dirname(__file__), "favicon.ico") 308 cptools.serveFile(icofile) 309 applyFilters('before_finalize') 310 cherrypy.response.finalize() 311 raise cherrypy.RequestHandled() 312 else: 313 # We didn't find anything 314 raise cherrypy.NotFound(objectpath) 315 302 # We didn't find anything 303 raise cherrypy.NotFound(objectpath) 316 304 317 305 general_header_fields = ["Cache-Control", "Connection", "Date", "Pragma", trunk/cherrypy/config.py
r886 r892 2 2 3 3 import ConfigParser 4 import os 4 5 5 6 import cherrypy … … 25 26 'server.thread_pool': 0, 26 27 'server.environment': "development", 28 29 '/favicon.ico': { 30 'static_filter.on': True, 31 'static_filter.file': os.path.join(os.path.dirname(__file__), "favicon.ico"),} 27 32 } 28 33 trunk/cherrypy/test/test_core.py
r891 r892 822 822 self.assertBody(data) 823 823 824 self.getPage("/ redirect/favicon.ico")824 self.getPage("/favicon.ico") 825 825 self.assertBody(data) 826 826

