[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
[mv] More infos about cookies and Expires!
****** message to minivend-users from jojo@buchonline.net ******
Hi list,
test with
------------snip -----------------
sub create_cookie {
my($domain,$path) = @_;
my ($name, $value, $out, $expire, $cookie);
my @jar;
@jar = ['MV_SESSION_ID', $Vend::SessionName, $Vend::Expire || undef];
push @jar, @{$::Instance->{Cookies}}
if defined $::Instance->{Cookies};
$out = '';
foreach $cookie (@jar) {
($name, $value, $expire) = @$cookie;
#::logGlobal("create_cookie: name=$name value=$value expire=$expire");
$value = Vend::Interpolate::esc($value)
if $value !~ /^[-\w:.]+$/;
$out .= "Set-Cookie: $name=$value;";
$out .= " path=$path;";
$out .= " domain=" . $domain . ";" if $domain;
::logGlobal( 'Server.pm:1', " expire 1 " . $expire );
# if (defined $expire or $Vend::Expire) {
$expire = $Vend::Expire unless defined $expire;
::logGlobal( 'Server.pm:2', " expire 2 " . $expire );
$out .= " expires=" .
strftime "%a, %d-%b-%y %H:%M:%S GMT ", gmtime($expire);
# }
$out .= "\r\n";
::logGlobal( 'Server.pm:3', " expire out " . $out );
::logGlobal( 'Server.pm:4', " expire " . $expire . " vendexpire = " . $Vend::Expire );
}
return $out;
}
------------snip -----------------
I get
[31/Mai/2000:17:42:21 +0200] - - Accepting connections from localhost|127\.0\.0\.1
[31/Mai/2000:17:42:27 +0200] bolorg /cgi-bin/bolorg Server.pm:1' expire 1 '
[31/Mai/2000:17:42:27 +0200] bolorg /cgi-bin/bolorg Server.pm:3' expire out Set-Cookie: MV_SESSION_ID=D2H6bVM9:192.168.1.10; path=/;> '
[31/Mai/2000:17:42:27 +0200] bolorg /cgi-bin/bolorg Server.pm:4' expire vendexpire = '
[31/Mai/2000:17:43:02 +0200] bolorg /cgi-bin/bolorg Server.pm:1' expire 1 '
31/Mai/2000:17:43:02 +0200] bolorg /cgi-bin/bolorg Server.pm:3' expire out Set-Cookie: MV_SESSION_ID=2H6bVM9J:192.168.1.10; path=/;> '
[31/Mai/2000:17:43:02 +0200] bolorg /cgi-bin/bolorg Server.pm:4' expire vendexpire = '
expire or Vend:Epire is always emtpy!!!
Removing the if conditions tell me
[31/Mai/2000:17:50:07 +0200] bolorg /cgi-bin/bolorg Server.pm:1' expire 1 '
[31/Mai/2000:17:50:07 +0200] bolorg /cgi-bin/bolorg Server.pm:2' expire 2 '
[31/Mai/2000:17:50:07 +0200] bolorg /cgi-bin/bolorg Server.pm:3' expire out Set-Cookie: MV_SESSION_ID=ZpQrgzGW:192.168.1.10; path=/; expires=Do , 01-Jan-70 00:00:00 GMT > '
[31/Mai/2000:17:50:07 +0200] bolorg /cgi-bin/bolorg Server.pm:4' expire vendexpire = '
[31/Mai/2000:17:51:34 +0200] bolorg /cgi-bin/bolorg Server.pm:1' expire 1 '
[31/Mai/2000:17:51:34 +0200] bolorg /cgi-bin/bolorg Server.pm:2' expire 2 '
[31/Mai/2000:17:51:34 +0200] bolorg /cgi-bin/bolorg Server.pm:3' expire out Set-Cookie: MV_SESSION_ID=rgzGWjQt:192.168.1.10; path=/; expires=Do , 01-Jan-70 00:00:00 GMT > '
[31/Mai/2000:17:51:34 +0200] bolorg /cgi-bin/bolorg Server.pm:4' expire vendexpire = '
I get cookie, but the time is wrong!
Any hints?
Thanks!
Joachim
--
Hans-Joachim Leidinger
buch online jojo@buchonline.net
Munscheidstr. 14 FAX: +49 209 1671449
45886 Gelsenkirchen FAX: 0209 1671449
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list