On 25 Nov 2002 06:28:25 -0800, kwatch <kwatch / lycos.jp> wrote:
>  I have a trouble with using mod_ruby 1.0.1.
>  I got the string "Content-Type: text/html" in browser when accessed to
>  mod_ruby script.
>  
>  
>  I wrote a script 'sample.rbx':
>  .----------------------------------------
>  #!/usr/bin/ruby
>  
>  print "Content-Type: text/html\n\n"
>  
>  print <<END
> <html>
>  <body>
>   <h1>mod_ruby test</h1>
>  </body>
> </html>
>  END
>  .----------------------------------------
>  

http://www.rubydoc.org/books/modruby/modruby.pdf , chapter 5

r = Apache.request
r.content_type = 'text/html'
r.send_http_header
exit(Apache::OK) if r.header_only?
print <<END
<html>
 <body>
  <h1>mod_ruby test</h1>
 </body>
</html>
END


-t