Hi,

In message "[ruby-talk:8602] Re: Problem - CGI::Session  (long)"
    on 01/01/04, "Guy N. Hurst" <gnhurst / hurstlinks.com> writes:

|Here is my experience of how the table works:
| 
|   true          | creates new session unless session id is provided
|                 | in options hash; ignores session id from cgi requests 
|   --------------|------------------------------------------------------
|   false         | never creates new session; if session id is not provided
|                 | nor found in cgi requests, then exception is raised
|   --------------|------------------------------------------------------
|   not supplied  | continue existing session, or create a new one if no
|                 | existing session is provided nor found in cgi requests

Thank you for clearing things.  This table is more accurate than mine.

|It is hard to follow this, maybe. But for me at least, it is easy enough to 
|tell that the most useful/common behavior is 'not supplied'.

Yes.  I deserve the shortest way for the most useful/common case.

|In fact, shouldn't 'false' actually have the effect that 'not supplied' has?
|(In any case, I think the use of true/false for new_session is debatable).

Maybe.  I'm not sure yet.

|I suppose I could always write my own sessions module (and I am on the verge
|of doing so for my applications), but I'd rather first cooperate. :-)
|I could also bypass cgi/session's lookup algorithm altogether and do my own
|lookup or creation logic and provide initialize() with the session_id everytime.
|But I really think all cgi programmers are going to need to do what I am
|doing, so why not make it easier for us? Or is there a large number of people
|who actually do not do things this way.

I don't get how it makes thing easier.  If making `false' bahavior to
have the same effect as `not supplied' (i.e. removing 3 lines) gives
you something worthy, I'd remove them.  But show me how things change
first, preferably with example code.

							matz.