Hi,
If I uncomment line 14 nothing is displayed and each time the page is
refreshed ( 2 second interval) ruby creates a different file
/tmp/rubysess.*
But if I uncomment lines 17-23 it works, displaying the last access time
and only one session file is created.
Why is that? I don't want to use cgi.out{} and stuff
If don't want to use cgi.out, you'd need to at least send back some
http headers (at least Content-type) for anything to reach the user.
(also, I don't know why you're using cgi = CGI.new("html4") if you
don't want the html helpers, but :\ )
···
On Aug 14, 9:55 am, Bruno Sousa <brgso...@gmail.com> wrote:
Hi,
If I uncomment line 14 nothing is displayed and each time the page is
refreshed ( 2 second interval) ruby creates a different file
/tmp/rubysess.*
But if I uncomment lines 17-23 it works, displaying the last access time
and only one session file is created.
Why is that? I don't want to use cgi.out{} and stuff
If don't want to use cgi.out, you'd need to at least send back some
http headers (at least Content-type) for anything to reach the user.
(also, I don't know why you're using cgi = CGI.new("html4") if you
don't want the html helpers, but :\ )
The first thing you should output is:
1)
print "Content-type: text/html\r\n\r\n"
or equivalently:
2)
puts cgi.header
3) Or you can also use cgi.out, which will automatically take care of
the header information, like this: