cgi session management is foobar

C

Cere Davis

If I just do:

require 'cgi'
require 'cgi/session'

cgi = CGI.new("html3")
sess = CGI::Session.new(cgi,
"new_session" => true,
"session_key" => "rubyweb",
"session_id" => "9650",
"prefix" => "web-session"
)

print "Content-Type: text/html\n\n"
print "<html><body>"
#puts sess.inspect
print "HTML content here"
print "</body></html>"

And run this script on the command line.

I get no html output beyond the Content-type line. Needless to say the
cgi script too.

When I comment out the session creation line the script runs fine.
What's wrong with this picture?

-Cere
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top