Skip to content

Instantly share code, notes, and snippets.

@cypres
Last active August 29, 2015 14:02
Show Gist options
  • Save cypres/81743e7f308a2cc817d7 to your computer and use it in GitHub Desktop.
Save cypres/81743e7f308a2cc817d7 to your computer and use it in GitHub Desktop.
trac nginx send file
--- /usr/local/lib/python2.7/site-packages/trac/web/api.py 2014-04-07 11:34:10.326789939 +0200
+++ /usr/local/lib/python2.7/site-packages/trac/web/api.py 2014-06-19 12:52:08.690985738 +0200
@@ -577,7 +577,7 @@
self.send_header('Last-Modified', last_modified)
use_xsendfile = getattr(self, 'use_xsendfile', False)
if use_xsendfile:
- self.send_header('X-Sendfile', os.path.abspath(path))
+ self.send_header('X-Accel-Redirect', os.path.abspath(path))
self.end_headers()
if not use_xsendfile and self.method != 'HEAD':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment