httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rainer M. Canavan" <rainer.cana...@sevenval.com>
Subject Re: [users@httpd] cookie read/write in module handler
Date Wed, 11 Dec 2013 19:09:53 GMT

On Dec 11, 2013, at 19:53 , Allasso Travesser <allassopraise@gmail.com> wrote:

>>> I am attempting to write a cookie, then retrieve it later.  I am doing this in
a handler, using simple code found from (sparse) information I have gathered from google searches:
>>> 
>>> apr_table_set(r->headers_out, "Set-Cookie", "value");
>>> char* cookie = apr_table_get(r->headers_in, "Set-Cookie");
>> 
>> When it comes back, it's a "Cookie" not a "Set-Cookie”.
> 
> thanks, that makes sense — unfortunately it didn’t work…  :-(


If you haven't done so already, use a custom LogFormat to log the outgoing
Set-Cookie and the incoming Cookie Headers, and/or use your favourite web 
developer tools to check if the header is set (and sent back). You could also 
either run httpd -X from within gdb or attach gdb to a running process and set 
a breakpoint at your apr_table_… lines. You should then be able to inspect r. 
You might  find the .gdbinit that comes with the apache source code helpful.

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


Mime
View raw message