You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by eeadev dev <ee...@gmail.com> on 2017/10/06 07:43:49 UTC

[users@httpd] how to get the expiration date of a cookie

I cannot find a place where is written how to get the expiration date of
the cookie I set.
Please anyone knows how to do that?

thanks

Re: [users@httpd] how to get the expiration date of a cookie

Posted by Eric Covener <co...@gmail.com>.
Browser don't send the expiration date, just the keys and values.  If
there was no "Cookie" in r->headers_in then your browser didn't send
any cookies. The other two tables are for output and you'd never see a
Cookie header in them (only Set-Cookie).   Debug with wireshark or
browser developer tools or the access log before looking further at
the code.

On Mon, Oct 9, 2017 at 5:40 AM, eeadev dev <ee...@gmail.com> wrote:
> I want to set and get this cookie and recovery the expiration date
>
>  I attached the cookie I set up by hand.
>
> I tried to get it via this 3 calls:
>
>     cookie = apr_table_get(r->headers_in, "Cookie");
>
>     cookie = apr_table_get(r->headers_out, "Cookie");
>
>     cookie = apr_table_get(r->err_headers_out, "Cookie");
>
> but all the results are empty; do you know why?
>
>
> 2017-10-06 5:56 GMT-07:00 Eric Covener <co...@gmail.com>:
>>
>> On Fri, Oct 6, 2017 at 6:18 AM, eeadev dev <ee...@gmail.com> wrote:
>> > is not this meant to be the mailing list of apache? I d need to get this
>> > info using C and the apr_library, not java unfortunately
>> >
>> > 2017-10-06 2:18 GMT-07:00 Suvendu Sekhar Mondal <su...@gmail.com>:
>> >>
>> >> On Fri, Oct 6, 2017 at 1:13 PM, eeadev dev <ee...@gmail.com> wrote:
>> >> > I cannot find a place where is written how to get the expiration date
>> >> > of
>> >> > the
>> >> > cookie I set.
>> >> > Please anyone knows how to do that?
>> >> >
>> >> Using program? In Java world you can use getMaxAge() of Cookie class.
>>
>> There is a low traffic modules developers list, this is the users list
>> (mostly webserver administrators).
>>
>> Since there is no cookie API, there is no API to retrieve the details
>> of a Set-Cookie header you added previously.  It's just strings.
>>
>> What's the actual problem?  If you are issuing the cookie, you control
>> the expiry that goes out with it.
>>
>> --
>> Eric Covener
>> covener@gmail.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org



-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to get the expiration date of a cookie

Posted by eeadev dev <ee...@gmail.com>.
I want to set and get this cookie and recovery the expiration date

 I attached the cookie I set up by hand.

I tried to get it via this 3 calls:





*    cookie = apr_table_get(r->headers_in, "Cookie");    cookie =
apr_table_get(r->headers_out, "Cookie");    cookie =
apr_table_get(r->err_headers_out, "Cookie");*

but all the results are empty; do you know why?


2017-10-06 5:56 GMT-07:00 Eric Covener <co...@gmail.com>:

> On Fri, Oct 6, 2017 at 6:18 AM, eeadev dev <ee...@gmail.com> wrote:
> > is not this meant to be the mailing list of apache? I d need to get this
> > info using C and the apr_library, not java unfortunately
> >
> > 2017-10-06 2:18 GMT-07:00 Suvendu Sekhar Mondal <su...@gmail.com>:
> >>
> >> On Fri, Oct 6, 2017 at 1:13 PM, eeadev dev <ee...@gmail.com> wrote:
> >> > I cannot find a place where is written how to get the expiration date
> of
> >> > the
> >> > cookie I set.
> >> > Please anyone knows how to do that?
> >> >
> >> Using program? In Java world you can use getMaxAge() of Cookie class.
>
> There is a low traffic modules developers list, this is the users list
> (mostly webserver administrators).
>
> Since there is no cookie API, there is no API to retrieve the details
> of a Set-Cookie header you added previously.  It's just strings.
>
> What's the actual problem?  If you are issuing the cookie, you control
> the expiry that goes out with it.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] how to get the expiration date of a cookie

Posted by Eric Covener <co...@gmail.com>.
On Fri, Oct 6, 2017 at 6:18 AM, eeadev dev <ee...@gmail.com> wrote:
> is not this meant to be the mailing list of apache? I d need to get this
> info using C and the apr_library, not java unfortunately
>
> 2017-10-06 2:18 GMT-07:00 Suvendu Sekhar Mondal <su...@gmail.com>:
>>
>> On Fri, Oct 6, 2017 at 1:13 PM, eeadev dev <ee...@gmail.com> wrote:
>> > I cannot find a place where is written how to get the expiration date of
>> > the
>> > cookie I set.
>> > Please anyone knows how to do that?
>> >
>> Using program? In Java world you can use getMaxAge() of Cookie class.

There is a low traffic modules developers list, this is the users list
(mostly webserver administrators).

Since there is no cookie API, there is no API to retrieve the details
of a Set-Cookie header you added previously.  It's just strings.

What's the actual problem?  If you are issuing the cookie, you control
the expiry that goes out with it.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to get the expiration date of a cookie

Posted by eeadev dev <ee...@gmail.com>.
is not this meant to be the mailing list of apache? I d need to get this
info using C and the apr_library, not java unfortunately

2017-10-06 2:18 GMT-07:00 Suvendu Sekhar Mondal <su...@gmail.com>:

> On Fri, Oct 6, 2017 at 1:13 PM, eeadev dev <ee...@gmail.com> wrote:
> > I cannot find a place where is written how to get the expiration date of
> the
> > cookie I set.
> > Please anyone knows how to do that?
> >
> Using program? In Java world you can use getMaxAge() of Cookie class.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

Re: [users@httpd] how to get the expiration date of a cookie

Posted by Suvendu Sekhar Mondal <su...@gmail.com>.
On Fri, Oct 6, 2017 at 1:13 PM, eeadev dev <ee...@gmail.com> wrote:
> I cannot find a place where is written how to get the expiration date of the
> cookie I set.
> Please anyone knows how to do that?
>
Using program? In Java world you can use getMaxAge() of Cookie class.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org