Hello, darren,
Friday, December 14, 2001, 9:39:46 PM, you wrote:
dc Alexei Danchenkov [EMAIL PROTECTED] said something to this effect on
12/14/2001:
Hello, All!
I wonder why my '$cookie-expires' for this code returns a
different result than the similar one with CGI::Cookie
(commented). The result is different in a way that some
additional binary code is being added to the expiry date.
$cookie = Apache::Cookie-new( $r,
-name=access,
-value=$value,
-expires=+10m );
#my $cookie = new CGI::Cookie(
-name=access,
-value=$value,
-expires=+10m );
$expiry = $cookie-expires;
Any suggestions?
dc Maybe I'm just slow, but I can see the difference between the
dc two. Can you elaborate?
dc (darren)
The only apparent difference that I see is that Apache::Cookie-new
requires $r to be sent to it as a first parameter, where CGI::Cookie
does not. Per the Apache::Cookie manpage, that should lead to the same
result, but does not in my case.
The cookie does not disappear. The expiry property however, gets
changed and then the $cookie-bake
(or $r-err_headers_out-add( Set-Cookie = $cookie-as_string )),
which should add 'Set-cookie' to the header does not work.
Here is an example of what Apache::Cookie-new returns:
cÑ% @cÑ%@cÑ%@cD$
áu9DTc~.Ñ DTc X@cÛ HTcu?h, 17-cÛ
HTcu?h-2001
14:35:10 GMT
new CGI::Cookie rather returns proper:
Mon, 17-Dec-2001 14:35:54 GMT
May be it worth noting that I am using Win32 (WindowsME) as a devel
machine and Red Hat 6.2 as a server, where it does not work either
with the same mistake.
I am still bugged - can't find what's wrong.
Alexei
mailto:[EMAIL PROTECTED]