From: Jim Freeze Date: 2002-10-07T10:11:34+09:00 Subject: Net/HTTP does not read RubyRequire page in mod_ruby Hi: I have set up a pre-loaded page with mod_ruby that I access with the URL http://mysite/preload_timetest The page loads fine via a browser, but Net/HTTP gives me the error listed below. On Sun, Oct 06, 2002 at 07:56:30PM -0400, Jim Freeze wrote: > On Sun, Oct 06, 2002 at 05:07:25PM -0400, Jim Freeze wrote: > > > > In httpd.conf > > > > > > RubyRequire apache/ruby-run > > RubyRequire apache/eruby-run > > RubyRequire apache/preload_timetest.rb # contains MyApp class > > > > # If URL is: http://www.mysite/preload_timetest > > RubyHandler Apache::MyApp # Call Apache::MyApp.handler ?? > > > > > > > > SetHandler ruby-object > > RubyHandler Apache::ERubyRun.instance > > > > > > > Ok, I did all the above and it works from a browser, > but Net::HTTP is not happy with me. > It gives the following error when I try to time the page: > > ./http_speed.rb mysite /preload_timetest > /usr/local/lib/ruby/1.6/net/http.rb:1177:in `read_status': wrong status line: (Net::HTTPBadResponse) > from ./http_speed.rb:48:in `join' > from ./http_speed.rb:48 > from ./http_speed.rb:48:in `each' > from ./http_speed.rb:48 Loading this page via telnet I get the following: telnet mysite 80 Trying 63.106.140.203... Connected to mysite Escape character is '^]'. GET /preload_timetest HTTP/1.0 HTTP/1.1 404 Not Found Date: Mon, 07 Oct 2002 00:57:51 GMT Server: Apache/1.3.26 (Unix) mod_ruby/0.9.8 Ruby/1.6.7 PHP/4.0.6 Connection: close Content-Type: text/html; charset=iso-8859-1 404 Not Found

Not Found

The requested URL /preload_timetest was not found on this server.


Apache/1.3.26 Server at 63.106.140.203 Port 80
Connection closed by foreign host. Looks like Net/HTTP is doing the right thing, I'm just not sure what my browser does to get the page to work. -- Jim Freeze ---------- Programming Ruby def initialize; fun; end A language with class