[Mongrel] X-Sendfile doesn't work

2007-01-25 Thread Bruno Celeste
Hi everyone, I try to use the X-Sendfile header, but it doesn't work as expected. In my controller: path = /home/bruno/file.tar.gz headers['X-Sendfile'] = path headers['Content-Type'] = application/octet-stream headers['Content-Length'] = File.size(path) render :nothing = true When I request

Re: [Mongrel] X-Sendfile doesn't work

2007-01-25 Thread Scott Brooks
On Thursday 25 January 2007 4:38 am, Bruno Celeste wrote: Hi everyone, I try to use the X-Sendfile header, but it doesn't work as expected. In my controller: path = /home/bruno/file.tar.gz headers['X-Sendfile'] = path headers['Content-Type'] = application/octet-stream

Re: [Mongrel] X-Sendfile doesn't work

2007-01-25 Thread Bruno Celeste
Thank you Scott. I'm accessing mongrel directly but I thought that mongrel can use X-Sendfile without needing another webserver. Parkplace (a camping app) uses X-Sendfile via mongrel, so I don't understand. Is it possible to do the same thing with rails? On 1/25/07, Scott Brooks [EMAIL

Re: [Mongrel] X-Sendfile doesn't work

2007-01-25 Thread Scott Brooks
I had a quick look through lib/mongrel/camping.rb and it looks like there is some code in the camping handler in order to handle X-Senfile. The rails handler does not have the same code, so that's probably why you are seeing the different results. Scott Brooks On Thursday 25 January 2007

Re: [Mongrel] X-Sendfile doesn't work

2007-01-25 Thread Bruno Celeste
Ok, that makes sense. Thank you! On 1/25/07, Scott Brooks [EMAIL PROTECTED] wrote: I had a quick look through lib/mongrel/camping.rb and it looks like there is some code in the camping handler in order to handle X-Senfile. The rails handler does not have the same code, so that's probably why

[Mongrel] x-sendfile

2006-05-30 Thread Josh Ferguson
I wrote an x-sendfile thing for the railshandler to get mongrel to catch the response header and stream out files from an application I'm writing but I'm pretty sure that zed said he'd built in x-sendfile somewhere already. I couldn't find it, could someone lead me to it? Does mongrel work