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 > > > > <IfModule mod_ruby.c> > > RubyRequire apache/ruby-run > > RubyRequire apache/eruby-run > > RubyRequire apache/preload_timetest.rb # contains MyApp class > > > > <Location /preload_timetest> # If URL is: http://www.mysite/preload_timetest > > RubyHandler Apache::MyApp # Call Apache::MyApp.handler ?? > > </Location> > > > > <Files *.rhtml> > > SetHandler ruby-object > > RubyHandler Apache::ERubyRun.instance > > </Files> > > </IfModule> > > > 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: <html> (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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML><HEAD> <TITLE>404 Not Found</TITLE> </HEAD><BODY> <H1>Not Found</H1> The requested URL /preload_timetest was not found on this server.<P> <HR> <ADDRESS>Apache/1.3.26 Server at 63.106.140.203 Port 80</ADDRESS> </BODY></HTML> 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