PATCH: set proper Host header on reproxy

Jonty jonty.wareing at gmail.com
Wed Jun 6 21:15:27 UTC 2007


You're right, this is a better way to do it. We're referencing by IP
to the reproxy host so it never occurred to me to use that as the host
header.

I'm not exactly sure what you're doing to achieve an infinite loop, we
also use it with Apache vservers (Which is why I very quickly hacked
up the patch in the first place, it didn't work *at all* before).

Anyway, this should probably replace my original patch unless someone
can see a major problem with it.

Cheers,
--Jonty

On 6/6/07, Leon Brocard <acme at astray.com> wrote:
> The patch provided by Jonty here is, errr, wrong:
>
>   http://lists.danga.com/pipermail/perlbal/2006-September/000278.html
>
> What Perlbal does currently upon reproxy is send the Host header of
> the original request with the reproxy request.
>
> What the attached patch does is set the Host header of the reproxy
> request to match the host of the reproxy request.
>
> I imagine most people are reproxying to Perlbal and thus ignoring
> virtual hosts on the server where the reproxies are being sent, which
> is why nobody has seen this as a problem.
>
> I'm reproxying to a virtual host Apache server. In current Perlbal I
> get infinite loops to my redirect handler, which is suboptimal ;-)
>
> The original patch seems to have an intent, and I can kind of figure
> out why you'd want it to work like that but I'm not sure it's a good
> thing. My patch is more likely to be the right thing.
>
> Any comments? Leon
>
>


More information about the perlbal mailing list