From: ts Date: 2001-01-14T20:42:46+09:00 Subject: [ruby-talk:9276] Re: GD and CGI >>>>> "D" == Derrick Shoemake writes: D> example that doesn't work but shows the concept. What do you want to say with "doesn't work" ? This script give the right output pigeon% ruby require 'cgi' cgi = CGI.new("html3") cgi.out{ cgi.html{ cgi.head{ "\n"+cgi.title{"This is a ruby test"} } + cgi.body{ "\n"+cgi.h1{ "A Test ruby page" } + cgi.br + cgi.img("/cgi-bin/fills.rb") } } } (offline mode: enter name=value pairs on standard input) ^D Content-Type: text/html Content-Length: 195 This is a ruby test

A Test ruby page


pigeon% ruby The script "/cgi-bin/fills.rb" must just send as first line "Content-Type: image/gif\n\n" before the output of the image Guy Decoux