Hrvoje Niksic wrote:

> Assume that Wget has retrieved a document from the host A, which
> hasn't closed the connection in accordance with Wget's keep-alive
> request.
>
> Then Wget needs to connect to host B, which is really the same as A
> because the provider uses DNS-based virtual hosts.  Is it OK to reuse
> the connection to A to talk to B?
<snip>
> FWIW, it works fine with Apache.

There is a fairly high probability that it will work with most hosts
(regardless of the server software). If an IP address has been registered
with multiple hosts, then the address alone is not sufficient to retrieve a
resource so you have to add a Host header.

It's possible that the server responding to the IP address forwards
connections to multiple backend servers. These backend servers may or may
not know about all the resources that the gateway server know about.

Since it will work most of the time, I think it's a reasonable optimization
to use, however you might want to add a --one-host-per-connection flag for
the rare cases where the current behavior won't work.

Tony

Reply via email to