|
Re: X-Sendfile doesn't work: msg#00177lang.ruby.mongrel.general
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 <scott-uHKwi6xvPSqw8sYbruYqicaQ3qMr+U50VpNB7YpNyf8@xxxxxxxxxxxxxxxx> wrote: > 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" > > headers['Content-Length'] = File.size(path) > > render :nothing => true > > > > When I request the file, nothing is shown, just a white page. If I do > > a HEAD request: > > > > HTTP/1.1 200 OK > > Connection: close > > Date: Thu, 25 Jan 2007 11:22:19 GMT > > Status: 200 OK > > X-Sendfile: /home/bruno/file.tar.gz > > Cache-Control: no-cache > > Server: Mongrel 1.0.1 > > Content-Type: application/force-download; charset=utf-8 > > Content-Length: 1 > > > > The weird thing is the content-length is bad and I think mongrel > > should not show the X-Sendfile header. I also tried to add the > > content-disposition header but didn't resolve the problem. > > > > I'm using edge rails and the latest mongrel (I deleted older mongrels) > > > > > > Thank you. > > X-Sendfile is handled by Apache, or Lighty, etc. If you are just accessing > mongrel directly, then what you are seeing is correct. If you are accessing > mongrel via apache, or some other webserver, then it's handling of X-Sendfile > is not setup properly. > > Scott Brooks > _______________________________________________ > Mongrel-users mailing list > Mongrel-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > http://rubyforge.org/mailman/listinfo/mongrel-users > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: NOT FOUND error: 00177, Charles Brian Quinn |
|---|---|
| Next by Date: | Re: NOT FOUND error: 00177, Chuck Vose |
| Previous by Thread: | Re: X-Sendfile doesn't worki: 00177, Scott Brooks |
| Next by Thread: | Re: X-Sendfile doesn't work: 00177, Scott Brooks |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |