streamer improvement, issue 884, thanks Niphlod

This commit is contained in:
mdipierro
2012-07-12 14:05:06 -05:00
parent d9802c374a
commit 4b42023171
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.0 (2012-07-12 11:26:41) dev
Version 2.00.0 (2012-07-12 14:05:01) dev
+4 -4
View File
@@ -62,10 +62,10 @@ def stream_file_or_304_or_206(
fsize = stat_file[stat.ST_SIZE]
mtime = time.strftime('%a, %d %b %Y %H:%M:%S GMT',
time.gmtime(stat_file[stat.ST_MTIME]))
headers['Content-Type'] = contenttype(static_file)
headers['Last-Modified'] = mtime
headers['Pragma'] = 'cache'
headers['Cache-Control'] = 'private'
headers.setdefault('Content-Type', contenttype(static_file))
headers.setdefault('Last-Modified', mtime)
headers.setdefault('Pragma', 'cache')
headers.setdefault('Cache-Control', 'private')
if request and request.env.http_if_modified_since == mtime:
raise HTTP(304, **{'Content-Type': headers['Content-Type']})