You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Juan Rivera <Ju...@citrix.com> on 2002/10/29 21:56:04 UTC
request_rec->cookies
Is there any easy way to get a list of the cookies (name/value pairs) from a
client's request?
Best regards,
Juan C. Rivera
Citrix Systems, Inc.
Re: request_rec->cookies
Posted by Maurizio Marini <ma...@datalogica.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 29 October 2002 09:56 pm, Juan Rivera wrote:
>Is there any easy way to get a list of the cookies (name/value pairs) from
> a client's request?
i used this function to read next elements of a 'table':
API_EXPORT(const char *)ap_table_get_next(const table *t, const char *key)
{
table_entry *elts = (table_entry *) t->a.elts;
static int i=-1;
if (key == NULL){ i=-1; return NULL; }
i++;
while( i < t->a.nelts){if (!strcasecmp(elts[i].key, key)){ return elts[i].val; } else i++; }
return NULL;
}
then it's easy ....
ap_table_get_next(resp_hdrs, NULL);
while( cookie = ap_table_get_next(resp_hdrs, "Set-Cookie")){
....
}
- --
Maurizio Marini
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9vvq64Q/49nIJTlwRAn1fAJ9/64x5p+7MHN1XX1P7DaQAaOjOEACdGCzd
r3/Awt7hL/Zp8tBIz0k8ams=
=uqU9
-----END PGP SIGNATURE-----