Eric Schwartz
11/18/2003 12:16:00 AM
"Bermejo, Rodrigo" <rodrigo.bermejo@ps.ge.com> writes:
> cgi.query_string.split("&").each {|x| p x }
> # "RUBYRULZ "
> #"rubyrulz"
Actually, it's:
irb(main):002:0> cgi.query_string.split("&").each {|x| p x }
"key=RUBYRULZ"
"key2=rubyrulz"
I'm sure you just meant that as an example of how to access the query
string directly, but FYI, it's broken in other ways too-- modern
browsers are allowed to use ';' to separate variables in a GET
request. In fact, I believe it is now the preferred form. Much
friendlier to do:
cgi.keys.each { |key| p cgi[key] }
anyway :)
-=Eric
--
Come to think of it, there are already a million monkeys on a million
typewriters, and Usenet is NOTHING like Shakespeare.
-- Blair Houghton.