You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by César Leonardo Blum Silveira <ce...@gmail.com> on 2007/06/06 16:05:07 UTC

Cookie expiration date format

Hello all,

I want to set the expiration date on a cookie sent by my module. Is
there any APR/Apache API function which returns a date in the format
specified for cookies?

Also, in order to set the expiration date on a cookie, the only thing
that is needed is to add "expires=[date]" to my cookie, which is set
by the "Set-Cookie" header, right?

Thank you in advance,

-- 
César L. B. Silveira
http://cesarbs.wordpress.com/

Re: Cookie expiration date format

Posted by Vincent Bray <no...@gmail.com>.
On 06/06/07, César Leonardo Blum Silveira <ce...@gmail.com> wrote:
> I want to set the expiration date on a cookie sent by my module. Is
> there any APR/Apache API function which returns a date in the format
> specified for cookies?

Not that I'm aware of, but then I'm not generally very aware. Anyway,
see line 124 of modules/metadata/mod_usertrack.c for an example of how
a very old apache module does it.

Given the lack of any application/x-form-url-encoded data decoding
routines in apache, I'd guess cookie handling is hands on too. Perhaps
libapreq2 could help if you don't like reinventing wheels?

-- 
noodl