Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: mod_backhand: users

Porblem with my session_id and zope

 

 

mod_backhand users RSS feed   Index | Next | Previous | View Threaded


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
=============================


jesus at omniti

Apr 5, 2002, 9:56 AM

Post #2 of 2 (539 views)
Permalink
Porblem with my session_id and zope [In reply to]

Derek Higgins wrote:
> 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.

[snip]

> 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")
> [ ... snip ... ]
> 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?

So it would seem

> Should this be addressed in the code for bySession?

No

> The README.bySession file talks about a ap_log_error statement that can
> be uncommented for debugging, where is it?

It was probably commented out permanently (deleted). It might be in the
CVS history. Most likely you will want to add your own ap_log_error
line if you are actually planning on debugging it.


--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7

mod_backhand users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.