On Sat, Sep 11, 2004 at 05:00:01AM +0900, Francis Hwang wrote:
> At first I thought this might be a MSIE problem, but I did the exact
> same thing with PHP and it works fine in both Safari and MSIE. So
> maybe I'm doing something really wrong, or maybe I've hit an obscure
> bug? Advice would be much appreciated.

My suggestion: write a test program which does something like

  data = $stdin.read
  puts "Content-type: text/html\r\n\r\n<html>#{CGI.escapeHTML(data)}</html>"

instead of using the CGI library. And do the same in PHP. Then you can tell
whether the data *is* getting posted to you by the browser (and hence a bug
in CGI which you can replicate), or is not.

Also: try printing #{ cgi.params['button'].inspect } - see if you get an
empty array, or an array containing one element (an empty string), which is
different of course.

And you could also try setting <input ..... name="button" value="foo">

Brian.