Index: [Article Count Order] [Thread]

Date:  Thu, 02 Sep 2004 09:48:53 +0200
From:  "Katarina WONG" <k.wong@...>
Subject:  send_fd broken under Apache2 ?
To:  modruby@... (modruby ML)
Message-Id:  <opsdovzra5ap9h0v@...>
In-Reply-To:  <200408312204.FMLAAB24180.modruby@...>
References:  <opsdlk9hfhap9h0v@...> <200408312204.FMLAAB24180.modruby@...>
X-Mail-Count: 01289

(i'm reposting this because I did not see it appear on the list)
Hello everyone,

I am trying to use send_fd under Apache 2.0.50 (with mod_ruby svn revision  
30) but no luck. This code
works fine with Apache 1.3.31 but when launched under 2.0.50, the
answering httpd starts eating up all the CPU with no response.

Has anyone been more succesful with this configuration ?

================================

r = Apache.request

fileName= "/srv/www/htdocs/q.avi"

r.headers_out['Content-Location'] = "KooooooooookoorOOOOOOOOOO.avi"
r.headers_out['Content-Type'] = "video/x-msvideo"
r.headers_out['Content-Length'] = "368492544"
r.send_http_header

exit(Apache::OK) if r.header_only?

File.open( fileName ) { |file| r.send_fd(file) }

exit(Apache::OK)	

=================================

Bye,

-- Katarina.