Content-Description: Forwarded message - Re: [phplib-users] Session url()
> Date: Sat, 16 Dec 2006 14:39:21 -0600
> From: Layne Weathers <layne@...>
> To: phplib-users@...
> Subject: Re: [phplib-users] Session url() method
> Lindsay Haisley wrote:
> >Formerly if one were to set $sess->mode to "get", the url()
> >method could be used to append the SID to both relative and
> >absolute URIs. This is no longer possible for absolute URIs,
> >and I had to patch session4.inc with code from the older
> >session.inc to restore this functionality.
> If you would send the patch, I or one of the other core can look at
> it and commit this change to CVS.
> Layne Weathers
Layne, et al,
Here's pseudo-code for this job. Would you all please take a look at this and
see if you see any logical problems with the method?
if (URL is relative and session.use_trans_id is set)
elseif ((URL is relative and session.use_trans_id is NOT set) or (URL is absolute))
if (mode is "get" or ((fallback_mode is "get") and (HTTP_COOKIE_VARS[session_name] is empty)))
clean URL of (possibly bogus) session data and append current session data as GET
if (mode is "cookie")
This assumes that session.use_trans_id can be tested even on early (<4.1.2)
versions of PHP or that support for such early versions isn't needed. It also
assumes that the typo/bug I reported re. session.use_only_cookies in
session4.inc is fixed.
Lindsay Haisley | "Fighting against human | PGP public key
FMP Computer Services | creativity is like | available at
512-259-1190 | trying to eradicate | <http://pubkeys.fmp.com>
http://www.fmp.com | dandelions" |
| (Pamela Jones) |