On Sat, 25 Mar 2006, Toby DiPasquale wrote:

> unknown wrote:
>> On Sat, 25 Mar 2006, Toby DiPasquale wrote:
>>
>>>
>>> Was there something wrong with my existing ruby-sendfile library?
>>>
>>> http://rubyforge.org/projects/ruby-sendfile
>>
>> ahhhhhh.
>>
>> ;-)
>
> Does that work for you, ara? It should work on Linux, Solaris and
> FreeBSD out of the box. I didn't put it in a gem because I wasn't sure
> how to get the GemSpec to correctly identify only the platforms on which
> it would build. Let me know.

it sure as heck does!


     harp:~/ruby-sendfile > cat a.rb
     require 'sendfile'

     open(__FILE__){|f| STDOUT.sendfile f}




     harp:~/ruby-sendfile > ruby a.rb
     require 'sendfile'

     open(__FILE__){|f| STDOUT.sendfile f}


this is fantastic.  basically i'll be responding to certain web requests with
something like

   send_mime_header
   sendfile huge_massive_file

and was thinking i'd have to fork a cat to make it fast enough - so this is
fantastic.

thanks alot.

-a
-- 
share your knowledge.  it's a way to achieve immortality.
- h.h. the 14th dali lama