Changeset 1481
- Timestamp:
- 12/09/06 12:33:08
- Files:
-
- branches/cherrypy-2.x/cherrypy/lib/cptools.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/cherrypy-2.x/cherrypy/lib/cptools.py
r1318 r1481 131 131 132 132 if not modified_since(path, stat): 133 response.body = [] 133 134 return [] 134 135 … … 198 199 response.body = bodyfile 199 200 return response.body 201 serve_file = serveFile 202 203 def serve_download(path, name=None): 204 """Serve 'path' as an application/x-download attachment.""" 205 # This is such a common idiom I felt it deserved its own wrapper. 206 return serve_file(path, "application/x-download", "attachment", name) 200 207 201 208 def fileGenerator(input, chunkSize=65536):

