View Issue Details

IDProjectCategoryView StatusLast Update
0011291mantisbtattachmentspublic2014-12-08 00:34
Reporterdhx Assigned Todhx  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version1.2.0 
Target Version1.3.0-beta.1Fixed in Version1.3.0-beta.1 
Summary0011291: Add support for Lighttpd's X-Sendfile method for sending attachments stored locally
Description

See http://blog.lighttpd.net/articles/2006/07/02/x-sendfile for a brief overview of how this method works. Essentially, it's a high-performance method for serving up static attachments from the disk. MantisBT would add a X-Sendfile header pointing to a file to serve up to the client from a local disk. When Lighttpd sees this header in the output, it'll use super-efficient methods for serving the file directly to the network port (without duplicate buffering in PHP, etc). AFAIK there is also an X-Sendfile2 header that allows you to specify a range from within the file to return to the client (for resuming support).

TagsNo tags attached.

Relationships

child of 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 

Activities

grangeway

grangeway

2013-04-05 17:57

reporter   ~0036521

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master b50a52a4

2010-01-05 03:36

dhx


Details Diff
Issue 0011291: Add X-Sendfile support for high performance file downloads

X-Sendfile is a header that is added to the output response from PHP
that points to a local file on the disk. Upon receiving the header once
the PHP script has terminated, the web server proceeds to replace all
content in the HTTP response with the contents of the file served up
locally from the disk. Headers set in the PHP script are usually kept
in-tact (depending on the web server implementation as to what gets
changed).

This technique is meant to improve performance as it now becomes
possible for the web server to use highly efficient file serving
functions to serve up the static content. For example, a web server
could use a zero-copy splice() call on Linux platforms to prevent
unnecessary buffering, drastically improving performance.

Servers that support X-Sendfile (or equivalent, as determined by the
$g_file_download_xsendfile_header_name option) include:
* Lighttpd
* Cherokee
* Apache (with mod_xsendfile)
* nginx
Affected Issues
0011291
mod - config_defaults_inc.php Diff File
mod - docbook/adminguide/en/configuration.sgml Diff File
mod - file_download.php Diff File