non-standard HTTP header supported by Apache to offload the process of serving large static files from dynamic scripts (eg: PHP, Python, Perl) after they have performed the necessary authorization or restriction logic.
Questions tagged [x-sendfile]
155 questions
3
votes
2 answers
X-Sendfile and VERY big files on Apache2
Any filesize over about 4GB is not going to work with the mod_xsendfile for Apache2 (as it sets the content length to a long).
I am willing to rewrite it to support this; however, I can find no documentation on how to set content length from the…

jreid42
- 1,240
- 1
- 12
- 19
2
votes
1 answer
X-Sendfile specific configuration .htaccess questions
I already have a question open about this, I don't know the etiquette for posting again but I feel that the previous question is going down a wrong path.
I have been researching all day on the topic of configuring XSendfile to work with PHP on our…

Edward Williams
- 307
- 1
- 7
- 18
2
votes
1 answer
Django WSGI list enabled modules
I am using Django on Apache with mod_wsgi. I would like to use X-Sendfile for sending files, but with fallback when the X-Sendfile is not available.
Is there any way to list loaded Apache modules or to check whether the X-Sendfile is enabled or not…

Viktor Stískala
- 1,447
- 1
- 13
- 23
2
votes
1 answer
Issue while serving file using PHP with xsendfile and custom htaccess file
I am working in a project where it needs to serve research papers and documents, so while serving the file it need to check few pass, if everything seems good then it should forward the file(research papers).
It would be easy to read the file and…

rakibtg
- 5,521
- 11
- 50
- 73
2
votes
0 answers
How to set Content-Encoding when using X-Sendfile to return gzipped files
I have gzipped data files and images on disk. I want to serve them with Apache and have the browser unzip them, by setting the Content-Encoding: gzip response header. Basically what mod_gzip does, but my data is already gzipped, so I don't need to…

RemcoGerlich
- 30,470
- 6
- 61
- 79
2
votes
0 answers
XSendFile: Varnish + nginx reverse proxy + apache
I have installed XSendFile on my server (using the apxs -cia mod_xsendfile.c)
in vhosts I'v turned it on, and gave the directory of my files to it
now the problem is, ERR_INVALID_RESPONSE
and this is the code:
header("Content-Type:…

Ebrahim Tahernejad
- 484
- 4
- 18
2
votes
1 answer
Lighttpd X-Sendfile corrupted files
Can anybody give me a hint on what is wrong? I have a script which generates a ZIP file on the fly and then serve it for download using X-Sendfile and lighttpd. Everything seems to be working but my downloaded file is a few bytes less compared to…

Emil Borconi
- 3,326
- 2
- 24
- 40
2
votes
2 answers
Show an image using X-Send File (Symfony2)
I have some images in "app/var/assets" (I have to put these images in that directory, I can't change this by client restriction).
I need to show these images. App directory is not an accesible path for Apache, so I need to use X-Send File.
How can I…

user2794692
- 361
- 2
- 10
- 24
2
votes
0 answers
Large downloads ending prematurely
I'm offering large downloads from my server of around 6.5gb and doing so using PHP and x-sendfile.
This has been working fine for months however recently the downloads have been ending prematurely for users at anywhere from 3gb-5.5gb.
No errors are…

John Mellor
- 2,351
- 8
- 45
- 79
2
votes
2 answers
downloading large sized file issue
I have a download script that works well in my local machine . But after uploading to the server , when my ios app calls the script it stops after 100-120 seconds . I just changed the script into another server .It worked perfectly . I dont know…

freakydev
- 143
- 1
- 2
- 11
2
votes
1 answer
Slower downloads through Apache than with PHP readfile
I've set up a Download-Script with PHP on my server, which checks some details before letting the user download files via Apache (X-Sendfile). The Files are outside the Document-Root.
The code for downloading with Apache and the Module X-Sendfile…

PhilG
- 161
- 2
- 10
2
votes
1 answer
X-Sendfile, Rails & Nginx
I'm getting frustated about my problem with X-Sendfile,NGinx and Rails. I've read several docs and tutorials but I just don't get the point.
Whatever I'm trying, I'm getting a 404. Here's the X-Sendfile part of NGINX.
location / {
…

ghostrifle
- 1,029
- 1
- 14
- 24
2
votes
0 answers
Apache Xsendfile not working with RewriteEngine
I'm trying to implement xSendFile in my Apache server. However, i found there is a conflict with the RewriteEngine and xsendfile.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^abc\.com$ [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1…

jackhao
- 3,457
- 3
- 22
- 43
2
votes
1 answer
Why does XSendfile emit intermittent garbled responses when used with Symfony Components BinaryFileResponse class?
Background
Part of my application's responsibility is handling requests for static resources (CSS, JavaScript, images) in a controlled manner. Based on some application logic, it will return one from a selection of different files that might be…

leftclickben
- 4,564
- 23
- 24
2
votes
2 answers
How to solve the memory-leak with send_file (or send_data) on Heroku?
I have a Rails 3 app that needs to generate an image and send the data to the browser.
The app must be deployed on Heroku.
However, Heroku only supports streaming through Mongrel which holds on to the memory. This then causes Heroku to slow, then…

multipolygon
- 2,194
- 2
- 19
- 23