Mailing List Archive

[mod_backhand-users] Backhand and cookies
Hi all,
for static pages mod_backhand is great
problems come wheh we use cookies

What i have
2 servers Apache 1.3.12 on Debian/GNU
test1.e-max.ru
test2.e-max.ru

i have file test.php wich is in every server document root
file is following
<?
setcookie ("TestCookie", "Test Value");
setcookie ("TestCookie1", "Test Value1");
setcookie ("TestCookie2", "Test Value2");
setcookie ("TestCookie3", "Test Value3");
setcookie ("TestCookie4", "Test Value4");
?>

<html>
<?
echo "1<br>"; <------------ ## here is on test1 on test2 digit is 2
:) ------->
echo $HTTP_COOKIE_VARS["TestCookie"];
echo "<br>";
echo $HTTP_COOKIE_VARS["TestCookie1"];
echo "<br>";
echo $HTTP_COOKIE_VARS["TestCookie2"];
echo "<br>";
echo $HTTP_COOKIE_VARS["TestCookie3"];
echo "<br>";
echo $HTTP_COOKIE_VARS["TestCookie4"];
?>


Both httpd.conf are the same:
<IfModule mod_backhand.c>
UnixSocketDir /var/backhand/backhand
MulticastStats 62.105.128.127:4445
AcceptStats 62.105.128.0/24
</IfModule>

<Directory /var/www>
# Backhand byAge
Backhand byRandom
# Backhand byLoad
</Directory>

output from test.php must be like this
2 <--------------------- ## depends on server thats return
result
Test Value
Test Value1
Test Value2
Test Value3
Test Value4

but one of every 4 or 5 reloads i get
2
Test Value, TestCookie1=Test Value1, TestCookie2=Test Value2,
TestCookie3=Test Value3, TestCookie4=Test Value4
Test Value1
Test Value2
Test Value3
Test Value4

here is from error log
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 1
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 2
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 3 --

GET /test.php HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: bg
Connection: Keep-Alive
Cookie: TestCookie=Test+Value, TestCookie1=Test+Value1,
TestCookie2=Test+Value2, TestCookie3=Test+Value3, TestCookie4=Test+Value4;
TestCookie1=Test+Value1; TestCookie2=Test+Value2; TestCookie3=Test+Value3;
TestCookie4=Test+Value4
Host: test2.e-max.ru
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
BackhandProxied: 62.105.128.81


[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 6 -- headers(12)
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 7 (Chunked)
(Keep-Alive)
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Check 8
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: (1689) Sending back fd(6).
[Thu Oct 12 03:39:46 2000] [error] mod_backhand: Request tally 2 [4]


Why it brokes cookies?
and how make just pure redirect in this case
Best regards, George Chavdarov
System administratir, www.emax.ru
[mod_backhand-users] Backhand and cookies [ In reply to ]
George,

This is strange. I am beginning to think my answer to every question is:
"Works for me... I can't replicate your problem." I know almost nothing about
PHP, so I tried my tests with mod_perl.

I downloaded apache 1.3.12, mod_perl 1.24, mod_backhand 1.1.0 and compiled and
installed it. I think wrote a small perl module that uses cookies.
Everything seems to proxy correctly for me.

Can you pinpoint when this error occurs. Does it happen only when the request
is proxied? Does it happened every time the request is proxied.

There are some submitted patches dealing with header merging that I have yet
to merge into my CVS copies. I have been very busy lately. By reading the
mod_backhand code, I don't see how it could be mangling the cookies (and only
the cookies). I will look again at my code and look at some of the patches
and see if any flags go up.

Any more specific information you can give will be helpful.

George Chavdarov wrote:
> for static pages mod_backhand is great
> problems come wheh we use cookies
> Why it brokes cookies?
> and how make just pure redirect in this case
> Best regards, George Chavdarov
> System administratir, www.emax.ru

--
Theo Schlossnagle
1024D/A8EBCF8F/13BD 8C08 6BE2 629A 527E 2DC2 72C2 AD05 A8EB CF8F
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7