--gj572EiMnwbLXET9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 30, 2011 at 09:21:55AM +0900, Ting Chang wrote:
> Sorry about misleading, I think my problem is that I cannot get any POST 
> data in my CGI, I tried your suggestion above and looks like the POST 
> data did not come through.
> 
> do you know what's possibly the reason?
> or do you have any format recommend in the POST data? the only thing 
> that matter to me is to get the url data so my cgi script can take that 
> url to do the rest of the work.

Try this as a way to diagnose the issue:

    require 'cgi'
    cgi = CGI.new
    cgi.params.each_pair {|k,v| puts k + ' => ' + v }

That should tell you exactly what parameter keys and values are being
sent to your Ruby script.  If you're actually viewing the output in the
browser, you might want to try adding some markup:

    require 'cgi'
    cgi = CGI.new
    puts "<ul>"
    cgi.params.each_pair {|k,v| puts "<li>#{k} => #{v}</li>" }
    puts "</ul>"

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

--gj572EiMnwbLXET9
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iEYEARECAAYFAk27nt0ACgkQ9mn/Pj01uKW6gwCfa9Pa+gwUJWv/PgaoT7Epr/KG
QwwAoNeWf28q3kOl8wx8BATJnwRk0iof
tz
-----END PGP SIGNATURE-----

--gj572EiMnwbLXET9--