I'm writing a filter module that needs to inspect cookie values sent
with the request.
Getting the cookie string is easy via:
char *s = apr_table_get(r->headers_in, "cookie");
However, this returns the whole cookie string, i.e., something like:
name=value; name="value"; name="quoted \"value\""
Possibly with $Version, $Path, etc. RFC 2965 is the spec.
I can write code to parse that out, but...
1. It is tedious.
2. Surely this has been done. Are there functions somewhere inside
Apache HTTPD, and accessible from a filter, that will do something like:
char *value = get_cookie(r, "cookiename");
3. Whatever is already coded will probably more faithfully implement
the RFC than what I cook up.
--
Neil Erdwien, n...@k-state.edu, 785-532-4905
Web Technologies Manager
Office of Mediated Education, Kansas State University