You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by Ulrich Schöbel <us...@aladyn.de> on 2004/09/12 22:55:48 UTC
Patch to cookie.ws3
There's a bug in src/generic/cookie.ws3
It's not possible to specify the expiration date of a cookie as a number of
seconds from the unix epoch, as described in 'web::cookiecontext'.
I attached a patch to cookie.ws3, which corrects it.
There's still a bug (?) I don't understand:
When I specify 1096575446 (30-Sep-2004.....) as expiration date, everything
works ok. When I specify 1096661846 (01-Oct-2004....) the cookie has an
expiration date of 'at end of session'. What's going wrong?
Best regards
Ulrich
Re: Patch to cookie.ws3
Posted by Ronnie Brunner <ro...@netcetera.ch>.
Hi Ulrich
Your patch looks good to me and I get
> ./websh3.5.1a1
% web::cookiecontext c -expires 1096661846; c::cset a b; c::save 3;web::put ""
Content-Type: text/html
Set-Cookie: 3=XDZ0YDSyq3XUydcC; expires=Fri, 01-Oct-2004 20:17:26 GMT
Generator: websh 3.5.1a1
%
Is this not what you'd expect? What does your output look like?
Regards
Ronnie
> There's a bug in src/generic/cookie.ws3
>
> It's not possible to specify the expiration date of a cookie as a number of
> seconds from the unix epoch, as described in 'web::cookiecontext'.
>
> I attached a patch to cookie.ws3, which corrects it.
>
> There's still a bug (?) I don't understand:
>
> When I specify 1096575446 (30-Sep-2004.....) as expiration date, everything
> works ok. When I specify 1096661846 (01-Oct-2004....) the cookie has an
> expiration date of 'at end of session'. What's going wrong?
>
> Best regards
>
> Ulrich
> To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: websh-dev-help@tcl.apache.org
----------------------------------------------------------------------
Ronnie Brunner ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org
Re: Patch to cookie.ws3
Posted by Ronnie Brunner <ro...@netcetera.ch>.
Hi Ulrich
> > > My environment is set to LANG=de_DE@euro , this makes 'clock format'
> > > print german month names, which, of course, aren't understood by the
> > > browser.
> >
> > Hmm, not good... What exactly is it that triggers German formatting in
> > Tcl? We should modify cookie.ws3 to always use English formatting if
> > possible.
I commited a fix that resolves locale dependency and works for me (I
tested w/o locale setting and with LANG de_CH and fr_FR ...)
I also fixed/added the corresponding tests and changed the
documentation.
Can you please check with the HEAD of the CVS if things work for you
like this?
Thanx
Ronnie
(PS: took this to websh-dev@tcl.apache.org: maybe someone else want to
verify this as well...)
----------------------------------------------------------------------
Ronnie Brunner ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich phone +41 1 247 79 79 fax +41 1 247 70 75
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org