So I tried this. This is what it looks like through Safari:

------------0xKhTmLbOuNdArY
Content-Disposition: form-data; name="text"


------------0xKhTmLbOuNdArY
Content-Disposition: form-data; name="small";
filename=""


------------0xKhTmLbOuNdArY
Content-Disposition: form-data; name="button.x"

46
------------0xKhTmLbOuNdArY
Content-Disposition: form-data; name="button.y"

9
------------0xKhTmLbOuNdArY--

Here's what it looks like through MSIE Mac OS X:

-----------------------------141511461516657
Content-Disposition: form-data; name="text"


-----------------------------141511461516657
Content-Disposition: form-data; name="small";
filename=""


-----------------------------141511461516657
Content-Disposition: form-data; name="button.x"

14
-----------------------------141511461516657
Content-Disposition: form-data; name="button.y"

7
-----------------------------141511461516657--

So, the data is being posted through both browser, but I can't seem to
retrieve it through the standard CGI library. The main difference is
that the boundary lines are different. Not sure if that would have any
impact.

Does this look like a bug?

Francis





Brian Candler <B.Candler / pobox.com> wrote in message news:<20040911075135.GA838 / uk.tiscali.com>...
> 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.