Joe
Thanks for the patch the expiration is working fine now
even though the test fails :-)
t/testall -v
All APREQ Tests:
Cookie: ..F.
Param: ...
Parsers: ..
9 tests run: 8 passed, 1 failed, 0 not implemented.
Failed tests in Cookie:
1) netscape_cookie: expected
---->
foo=bar; path=/quux; domain=example.com; expires=Thu, 18-Dec-2003 11:51:26
GMT
<----
but saw
---->
foo=bar; path=/quux; domain=example.com; expires=Fri, 17-Dec-2004 11:50:55
GMT
<----
While testing this I figured another problem, the secure flag is not
working either !
But the path and the domain attributes are !
So maybe you'll find some time to fix this as well :-)
Anyway, thanks for your help and the solution.
BTW, when will the fix be part of the cvs ?
Mit freundlichen Gr��en / Best Regards
Swen Schillig
|---------+---------------------------->
| | Joe Schaefer |
| | <[EMAIL PROTECTED]|
| | rsys.com> |
| | Sent by: news |
| | <[EMAIL PROTECTED]|
| | rg> |
| | |
| | |
| | 12/18/2003 06:00 |
| | AM |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: Re: [mp2] Apache::Cookie
|
|
|
|
|
>--------------------------------------------------------------------------------------------------------------------------------------------------|
Joe Schaefer <[EMAIL PROTECTED]> writes:
> It looks to me like there may be a problem in apreq_cookie.c
> (it may not be computing the "expires" date correctly for Netscape
> cookies). Which version of libapr are you using?
If you're using the latest libapr, this patch to libapreq2
should fix the problem.
Index: src/apreq_cookie.c
===================================================================
RCS file: /home/cvs/httpd-apreq-2/src/apreq_cookie.c,v
retrieving revision 1.20
diff -u -r1.20 apreq_cookie.c
--- src/apreq_cookie.c 26 Sep 2003 13:58:33 -0000 1.20
+++ src/apreq_cookie.c 18 Dec 2003 04:57:37 -0000
@@ -89,7 +89,7 @@
if (!strcasecmp(time_str, "now"))
c->max_age = 0;
else
- c->max_age = apreq_atoi64t(time_str);
+ c->max_age = apr_time_from_sec(apreq_atoi64t(time_str));
}
static int has_rfc_cookie(void *ctx, const char *key, const char *val)
@@ -478,7 +478,7 @@
return apr_snprintf(buf, len, format, c->v.name, c->v.data,
c->version,
NULL2EMPTY(c->path), NULL2EMPTY(c->domain),
NULL2EMPTY(c->port), NULL2EMPTY(c->comment),
- NULL2EMPTY(c->commentURL), c->max_age);
+ NULL2EMPTY(c->commentURL),
apr_time_sec(c->max_age));
}
--
Joe Schaefer
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html