[Mongrel] x_send_file sends a 1 byte file

Jeremy Kemper jeremy at bitsweat.net
Tue Jun 17 03:23:09 EDT 2008


On Mon, Jun 16, 2008 at 11:35 PM, George Schreiber <lists at ruby-forum.com> wrote:
> Hello,
>
> sorry if creating a dupe...
>
> I'm trying to download files to authenticated users in my app. I've set
> up x_send_file. All seems to be correct to me, however when I try to
> download any file, I get a 1-byte long file downloaded.
>
> I am getting this already in development - so no Apache, no lighthttpd,
> just a mongrel_rails start in the root of my app.
>
> Any help/hint would be appreciated.

This only works with a frontend httpd to intercept the X-Sendfile
response header and send the actual file.

Without a frontend httpd, you're seeing the expected result. Use
firebug to verify.

jeremy


More information about the Mongrel-users mailing list