Hi I''m currently trying to use X-Sendfile to take some load off my rails app, unfortunately in my development environment mongrel is happily passing through the x-sendfile header, presumably for the (non- existant) proxy to handle the header. Is there some way to make mongrel process the x-sendfile header itself? Thanks jebw
I believe this functionality doesn''t exist in mongrel. On Jan 8, 2008 9:20 AM, Jeremy Wilkins <jeremy at ibexinternet.co.uk> wrote:> Hi > > I''m currently trying to use X-Sendfile to take some load off my rails > app, unfortunately in my development environment mongrel is happily > passing through the x-sendfile header, presumably for the (non- > existant) proxy to handle the header. > > Is there some way to make mongrel process the x-sendfile header itself? > > Thanks > > jebw > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
Hi Jebw, Which webserver are you using to handle the X-Sendfile requests in production? If you''re using nginx in production, it''s pretty easy to get this running on your development machine too (it has X-Accel-Redirect, which is just like X-Sendfile). You can have it proxy through to your development mongrel server at port 3000. -Pete On Jan 10, 2008, at 8:40 PM, Alex Egg wrote:> I believe this functionality doesn''t exist in mongrel. > > On Jan 8, 2008 9:20 AM, Jeremy Wilkins <jeremy at ibexinternet.co.uk> > wrote: >> Hi >> >> I''m currently trying to use X-Sendfile to take some load off my rails >> app, unfortunately in my development environment mongrel is happily >> passing through the x-sendfile header, presumably for the (non- >> existant) proxy to handle the header. >> >> Is there some way to make mongrel process the x-sendfile header >> itself? >> >> Thanks >> >> jebw >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users
For what it''s worth, I have a method that handles the logic for sending the file. If the rails environment == ''production'' it just sets the headers to trigger apache x_send_file. Otherwise I just use the default sendfile that comes with rails... -Steven Alex Egg wrote:> I believe this functionality doesn''t exist in mongrel. > > On Jan 8, 2008 9:20 AM, Jeremy Wilkins <jeremy at ibexinternet.co.uk> wrote: > >> Hi >> >> I''m currently trying to use X-Sendfile to take some load off my rails >> app, unfortunately in my development environment mongrel is happily >> passing through the x-sendfile header, presumably for the (non- >> existant) proxy to handle the header. >> >> Is there some way to make mongrel process the x-sendfile header itself? >> >> Thanks >> >> jebw >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> >> > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users >
unrelated, but on Lighttpd, I had to use @headers[''X-LIGHTTPD-Send-file''] -- pedro g On 1/11/08, Steven Hansen <runner at berkeley.edu> wrote:> > > For what it''s worth, I have a method that handles the logic for sending > the file. If the rails environment == ''production'' it just sets the > headers to trigger apache x_send_file. Otherwise I just use the default > sendfile that comes with rails... > > > -Steven > > > > Alex Egg wrote: > > I believe this functionality doesn''t exist in mongrel. > > > > On Jan 8, 2008 9:20 AM, Jeremy Wilkins <jeremy at ibexinternet.co.uk> wrote: > > > >> Hi > >> > >> I''m currently trying to use X-Sendfile to take some load off my rails > >> app, unfortunately in my development environment mongrel is happily > >> passing through the x-sendfile header, presumably for the (non- > >> existant) proxy to handle the header. > >> > >> Is there some way to make mongrel process the x-sendfile header itself? > >> > >> Thanks > >> > >> jebw