View Issue Details

IDProjectCategoryView StatusLast Update
0011291mantisbtattachmentspublic2014-12-08 00:34
ReporterdhxAssigned Todhx 
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

See 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.


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




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 08:36:00


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

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
mod - config_defaults_inc.php Diff File
mod - docbook/adminguide/en/configuration.sgml Diff File
mod - file_download.php Diff File

Issue History

Date Modified Username Field Change
2009-12-16 21:42 dhx New Issue
2010-01-05 03:46 dhx Assigned To => dhx
2010-01-05 03:46 dhx Status new => assigned
2010-01-05 03:46 dhx Target Version => 1.3.0-beta.1
2010-01-05 03:46 dhx Status assigned => resolved
2010-01-05 03:46 dhx Fixed in Version => 1.3.0-beta.1
2010-01-05 03:46 dhx Resolution open => fixed
2010-01-05 03:50 dhx Changeset attached master b50a52a4 =>
2010-04-23 23:22 dhx Status resolved => closed
2013-04-05 17:57 grangeway Status closed => acknowledged
2013-04-05 17:57 grangeway Note Added: 0036521
2013-04-05 18:02 grangeway Relationship added child of 0015721
2013-04-06 03:44 dregad Status acknowledged => resolved
2013-04-06 07:20 grangeway Status resolved => acknowledged
2013-04-06 09:26 dregad Tag Attached: 2.0.x check
2013-04-06 09:26 dregad Status acknowledged => resolved
2014-09-23 18:05 grangeway Tag Detached: 2.0.x check
2014-12-08 00:34 vboctor Status resolved => closed