httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Erdwien <n...@k-state.edu>
Subject Re: cookie handling functions
Date Thu, 16 Sep 2010 05:35:52 GMT
Excellent -- this is exactly what I was looking for.  I've set it up and 
it works great.

BTW, pay attention when it says to use gmake on Solaris.  :-)

Thanks.


On 9/15/2010 11:46 AM, Brian McQueen wrote:
> I think apreq has that.  If you don't have it already, get it and
> you'll be glad you did.  Look at its header files.  Lots of good stuff
> in them.
>
> On Wed, Sep 15, 2010 at 9:34 AM, Neil Erdwien<neil@k-state.edu>  wrote:
>> 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, neil@k-state.edu, 785-532-4905
>> Web Technologies Manager
>> Office of Mediated Education, Kansas State University
>>

-- 
Neil Erdwien, neil@k-state.edu, 785-532-4905
Web Technologies Manager
Office of Mediated Education, Kansas State University

Mime
View raw message