# XSendFile problem

**URL:** <https://www.ruby-forum.com/t/xsendfile-problem/111443>\
**Category:** Rails\
**Created:** [August 7, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/xsendfile-problem/111443 "2007-08-07T12:59:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 7, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/xsendfile-problem/111443/1 "2007-08-07T12:59:10Z")

</div>

I am trying to user XSendFile in my application.  
I have installed the plugin and in the environment.rb included this line  
XSendFile::Plugin.replace\_send\_file!  
but it is unable to read the files.

Earlier i had used send\_file but it increases the mongrel size and slows  
down the application.  
Any suggestions about how to make it work?

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 7, 2007, 1:29pm UTC](https://www.ruby-forum.com/t/xsendfile-problem/111443/2 "2007-08-07T13:29:39Z")

</div>

I don’t think XSendFile works with mongrel. Do you have lighttpd in  
front of mongrel ?

If not, check  
[http://www.gemjack.com/gems/mongrel\_secure\_download-0.1/classes/SecureDownload.html](http://www.gemjack.com/gems/mongrel_secure_download-0.1/classes/SecureDownload.html)

Thanks,  
Pratik

On 8/7/07, Neha C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Cheers!

- Pratik  
[http://m.onkey.org](http://m.onkey.org)

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 7, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/xsendfile-problem/111443/3 "2007-08-07T13:34:20Z")

</div>

No we are using Apache 2.2

---

<div class="post-metadata">

**Author:** ![neha-rohan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/34f0e0/32.png) [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Post date:** [August 7, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/xsendfile-problem/111443/4 "2007-08-07T13:41:42Z")

</div>

Oh. No clue then. On totally irrelevant note, you should look into  
nginx.

On 8/7/07, Neha C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## No we are using Apache 2.2
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Cheers!

- Pratik  
[http://m.onkey.org](http://m.onkey.org)
