[Gambas-user] Session.CookiePath

Benoît Minisini g4mba5 at gmail.com
Sun Dec 27 13:02:01 CET 2020


Le 27/12/2020 à 11:29, Hans Lehmann a écrit :
> Hello,
> 
> while working with the Session class I used the following source code:
> 
> <%
>   Print "<br>SESSION-COOKIE-PATH = "; Application.Root;
>   Print "<br>SESSION-COOKIE-PATH = "; CGI["SCRIPT_NAME"];
>   Print "<br>SESSION-COOKIE-PATH = "; Session.CookiePath;
> %>
> 
> I expected three identical results.
> 
> But these are the results:
> 
> SESSION-COOKIE-PATH =
> SESSION-COOKIE-PATH = /.
> SESSION-COOKIE-PATH =
> 
> Where is the error?
> 
> With kind regards
> 
> Hans
> 

Application.Root normalizes CGI["SCRIPT_NAME"], and returns "" when its 
value is "./" or "/".

And when Session.CookiePath is void, the contents of CGI["SCRIPT_NAME"] 
is used, except that "/." is replaced by "/" in that case.

Regards,

-- 
Benoît Minisini


More information about the User mailing list