using the session object

5 views
Skip to first unread message

Hepner

unread,
Jan 6, 2011, 11:45:36 AM1/6/11
to v8cgi
hello all,

has anyone used the session object successfully with the new version
(0.9.0)?
I found that i have to do something like:

var session = new (include('session').Session)
(request, response);

in the beginning of the file in order for it to work

could it be related to the fact that im running v8cgi using the
cgi_script approach (on *windows*)

Ondřej Žára

unread,
Jan 8, 2011, 7:11:33 AM1/8/11
to v8...@googlegroups.com
Hi there,

yeah, the session module has been rewritten in order to reduce the
amount of "automagickness" in v8cgi. No global variables are now
created, the user is responsible for session initialization.

Also note that "include" is a non-standard extension and might get
eventually removed. The recommended code for starting session thus
looks like:

var s = new (require("session").Session)(request, response);

It is probably my fault that this session change was not mentioned in
the changelog - I will fix this in a moment.


Sincerely,
Ondrej Zara

2011/1/6 Hepner <gaf...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "v8cgi" group.
> To post to this group, send email to v8...@googlegroups.com.
> To unsubscribe from this group, send email to v8cgi+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/v8cgi?hl=en.
>
>

Amir Gafner

unread,
Jan 8, 2011, 3:30:14 PM1/8/11
to v8...@googlegroups.com
THANKS!
Reply all
Reply to author
Forward
0 new messages