Changeset 128
- Timestamp:
- 01/13/05 09:04:08
- Files:
-
- trunk/cherrypy/_cphttptools.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cphttptools.py
r124 r128 329 329 330 330 cpg.response.headerMap['Last-Modified'] = strModifTime 331 f=open(fname, 'rb') 332 cpg.response.body = f.read() 333 f.close() 331 # Set Content-Length and use an iterable (file object) 332 # this way CP won't load the whole file in memory 333 cpg.response.headerMap['Content-Length'] = stat[6] 334 cpg.response.body = open(fname, 'rb') 334 335 # Set content-type based on filename extension 335 336 i = path.rfind('.')

