Hi,
I've just investigated some similar issues I've been having with pound not
rewriting the location when my backend appends its port to the correct
hostname when doing a redirect. I noticed the following if statement in
need_rewrite (svc.c line 742) which seems to have mismatched brackets:
if(memcmp(&be_addr.sin_addr.s_addr, &in_addr.sin_addr.s_addr,
sizeof(in_addr.sin_addr.s_addr)) == 0
&& (memcmp(&be_addr.sin_port, &in_addr.sin_port,
sizeof(in_addr.sin_port) != 0
|| strcasecmp(proto, (lstn->ctx == NULL)? "http": "https")))) {
The second line is missing a closing bracket after the sizeof so the second
memcmp call is actually:
memcmp(&be_addr.sin_port, &in_addr.sin_port, sizeof(in_addr.sin_port) != 0
|| strcasecmp(proto, (lstn->ctx == NULL)? "http": "https")))
Changing this if to the following fixed the port on my redirects:
if(memcmp(&be_addr.sin_addr.s_addr, &in_addr.sin_addr.s_addr,
sizeof(in_addr.sin_addr.s_addr)) == 0
&& (memcmp(&be_addr.sin_port, &in_addr.sin_port,
sizeof(in_addr.sin_port)) != 0
|| strcasecmp(proto, (lstn->ctx == NULL)? "http": "https"))) {
It looks like there is a similar issue for IPv6 redirects on line 754.
Regards,
Andrew
-----Original Message-----
From: Dave Steinberg [mailto:[email protected]]
Sent: 20 March 2009 15:04
To: [email protected]
Subject: Re: [Pound Mailing List] location headers problems
>> telnet www.myweb.es 80
>> GET /principal/
>>
>> and I receive location header
>> Location /principal/index.php
>>
>> NO PROBLEM, but if i put
>>
>> telnet www.myweb.es 80
>> GET /principal (without slash)
>>
>> Location header receibed:
>> Location: http://www.myweb.es:10000/principal/index.php
>>
>> and the client redirect to http://www.myweb.es:10000/principal/index.php
>>
>> I think that rewritelocation 1 solve this problem but dont work,
>> I compiled pound 2.3.2 with this file configuration and work correctly,
the
>> client dont receive the backend port. Why ?
>>
>> I readed CHANGELOG for pound 2.4.4:
>> -"fixed redirection problem (missing slash in
>> Location/Content-location)"
This sounds like a problem with your backend. Does the same thing
happen if you connect directly and issue those same GET commands?
--
Dave Steinberg
http://www.geekisp.com/
http://www.steinbergcomputing.com/
--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.
--
To unsubscribe send an email with subject unsubscribe to [email protected].
Please contact [email protected] for questions.