Changeset 927
- Timestamp:
- 01/13/06 09:40:27
- Files:
-
- trunk/cherrypy/filters/staticfilter.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/filters/staticfilter.py
r922 r927 66 66 67 67 try: 68 cptools.serveFile(filename) 68 # you can set the content types for a complete directory per extension 69 content_types = config.get('static_filter.content_types', None) 70 content_type = None 71 if content_types: 72 root, ext = os.path.splitext(filename) 73 content_type = content_types.get(ext[1:], None) 74 cptools.serveFile(filename, contentType=content_type) 69 75 request.execute_main = False 70 76 except cherrypy.NotFound: … … 81 87 except cherrypy.NotFound: 82 88 pass 83

