Patch: Send host header when reproxying

Jonty jonty.wareing at
Mon Sep 18 09:45:40 UTC 2006

On 9/18/06, Mark Smith <junior at> wrote:
> > I was still confused about the patch.  Which hostname?
> > The original request's host header?  Because it shouldn't.
> > Or the X-Reproxy-URL one?  But if that has a hostname, I've never designed
> > for that to work, so who's doing the DNS lookup?  We're not using
> > IO::Socket::INET there, are we?  Thought we did socket/connect by hand to
> > backends?  I don't think we're doing async DNS lookups, so reproxying
> > things with hostnames would stall the event loop ....
> No...
> On the request, they pass in a Host header.  We potentially use this to do
> things with the vhost plugin, but then we generally throw it away.
> I could see it being useful though, in this case they're using Apache to
> serve files on the backend.  But they're using Apache to serve files for
> different clients - Perlbal (via reproxy) on one end and maybe users on
> the other.
> So you pass through the original request's Host header which you use in
> Apache to know what they're talking about.
> I don't know that it's generally useful, but I can certainly see a use
> case.  I didn't think it was worth adding a 'pass this through' option
> though, because I can't see any harm in passing it?

Mark has it correct - I considered adding an X-Reproxy-Host option
that could be specified by the reproxy-initiating host but decided
that it wasn't really worth it, as if you're setting up Vservers for
use with this kind of thing it's no real trouble to use the main
hostname for them.
If you'd prefer I can switch it to use something along the lines of a
specific return header instead?


More information about the perlbal mailing list