diff options
-rwxr-xr-x | fbin.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -143,6 +143,9 @@ class Application(object): return [] mime = mimetypes.guess_type(file.filename, strict = False)[0] or 'application/octet-stream' + if settings.use_xsendfile: + start_response('200 OK', [('X-Sendfile', filename.encode('utf8')), ('Last-Modified', file.date.strftime(rfc1123_format))]) + return [] start_response('200 OK', [('Content-Type', mime), ('Content-Length', str(os.path.getsize(filename))), ('Last-Modified', file.date.strftime(rfc1123_format))]) |