
From scott@sonic.net Fri Apr  3 23:27:00 1998
Date: Mon, 19 Jan 1998 16:23:49 -0800
From: Scott Doty <scott@sonic.net>
To: htdig@sdsu.edu
Cc: Dane Jasper <dane@sonic.net>
Subject: htdig: htdig-3.0.8b1 patch -- vhost support

Hi,

I thought you might enjoy a small patch.

HTTP/1.1 includes a "Host:" header in requests.  This is used to
identify the virtual host without consuming IP addresses for each host.

I just ran into a situation where I needed to index a site on Concentric's
network -- and Concentric's web sites are all virtual.

Solution: a one-line patch, appended to this message.

Yes, htdig claims HTTP/1.0 in requests, but I don't think there
are any servers fascist enough to return an error on seeing a
"Host:" header in such requests.

 -Scott Doty <scott@sonic.net>    http://www.sonic.net/~scott/
  whois '!scd'

[ patch follows]_________________________________________________
--- htdig-3.0.8b1/htdig/Document.cc.dist        Mon Aug  4 15:08:02 1997
+++ htdig-3.0.8b1/htdig/Document.cc     Mon Jan 19 16:07:42 1998
@@ -295,6 +295,8 @@
     command << "User-Agent: htdig/" << HTDIG_VERSION <<
        " (" << config["maintainer"] << ")\r\n";
 
+    command << "Host: " << url->host() << ":" << url->port() << "\r\n";
+
     //
     // If a referer was provided, we'll send that as well.
     //
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.
