Patch: Send host header when reproxying

Mark Smith junior at danga.com
Mon Sep 18 06:38:18 UTC 2006


> 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 Smith
junior at danga.com


More information about the perlbal mailing list