
derek.higgins at propylon
Mar 28, 2002, 4:54 AM
Post #1 of 2
(533 views)
Permalink
|
|
Porblem with my session_id and zope
|
|
Hi all, I was having a lot of trouble with the bySession candidacy function lately when no matter what I did values I set for the identifier seemed to be getting ignored. this was the relevant section in my http.conf (solaris box) <Directory /> Options FollowSymLinks AllowOverride None Backhand byAge 5 Backhand removeSelf Backhand byRandom Backhand bySession mcid= </Directory> but when I set the cookie mcid to a session_id it made no difference and all requests went to random box's (linux boxes) each time and ignored the sessions the apache servers that the requests are being sent to are inturn proxying the requests to a zope server on a different port number and its on the zope server that the cookies are being set RESPONSE.setCookie("mcid", "ac110a12") I needed to find out what was wrong so I kicked off gdb to see what was going on and noticed that the value of the session_id being retrieved from the http header was inclosed in quotes see below The version of backhand I have I got from :pserver:anonymous [at] commedia:/storage/cvs about a week ago. Breakpoint 2, bySession (r=0xf95d0, servers=0xffbee590, n=0xffbeed94, identifier=0xdbab8 "mcid=\"") at builtins.c:351 351 const char *session_id=NULL, *cookie; (gdb) s 355 if(!identifier) (gdb) n 363 if(cookie = ap_table_get(r->headers_in, "Cookie")) { (gdb) 364 if(session_id = strstr(cookie, identifier)) (gdb) 366 session_id += strlen(identifier); (gdb) p session_id $1 = 0xf6138 "mcid=\"ac110a41\"" (gdb) n 368 if(!session_id && r->args) { (gdb) p session_id $2 = 0xf613e "\"ac110a41\"" Which meant that the decode loop was getting a " as the first character to decode as a hex digit and it all went wronge from there This means I can get the session_id to work if I replace the bySession configuration in my http.conf with Backhand bySession mcid=" I have three questions Does this mean that the zope web server sets cookies different to the rest of the web servers in the world? Should this be addressed in the code for bySession? The README.bySession file talks about a ap_log_error statement that can be uncommented for debugging, where is it? Thanks in advance, Derek --- Some day my ship will come in, but with my luck, I'll be at the airport. ============================= Derek Higgins derek.higgins at propylon.com =============================
|