You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by gr...@mail.netio.org on 2003/07/18 20:02:51 UTC
Getting list of all cookies available?
I'm using Apache 1.3.27, mod_perl 1.28, and Apache::ASP 2.53 (+ mod_ssl,
all on cygwin).
I know how I can get and set cookies in Apache:ASP, this is no problem.
What I am trying to figure out is how to get a list of cookies that are
available.
Is there a way to get the list of available cookies from Apache::ASP or
mod_perl? Or should I just use the HTTP_COOKIE variable and parse that to
get my list?
Thanks,
Greg
Re: Getting list of all cookies available?
Posted by Iphigenie <ip...@iphi.net>.
>Is there a way to get the list of available cookies from Apache::ASP
>or mod_perl?
Now I am not the most expert at mod_perl, still a newbie myself
Here's how i have done i when i needed to see the whole list to find out what was going on with a cookie not working
use Apache::Cookie;
my %allcookies = Apache::Cookie->fetch;
This will give you all the cookies the browser sends for the URL.
You can get the list through 'keys %allcookies', test for the presence of a cookie with 'exists $allcookies{'somestring'}'
Apache::Cookie comes with Apache::Request in libapreq, if i recall correctly (someone will correct me if i am wrong)
-- Iphigenie, iphi@iphi.net on 19/07/2003