XSendFile in development environment

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.

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

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

unrelated, but on Lighttpd, I had to use
@headers[‘X-LIGHTTPD-Send-file’]


pedro g