Host: Function addition to htdig (fwd)


Matthew M Groener (matt@xlrn.ucsb.edu)
Tue, 28 Oct 1997 12:25:25 -0800 (PST)


Hope this gets to you this time. Sounds like you're moving away from sdsu?

-matt

------------------------------------------------------------------------
Matthew Groener, matt@xlrn.ucsb.edu Phone: (805) 893-4906
Manager, Information Systems Pager: (805) 882-6170
University of California Santa Barbara, Extension Fax: (805) 893-4943
Dedicated to Lifelong Learning http://www.xlrn.ucsb.edu/
------------
Never let your schooling interfere with your education.

---------- Forwarded message ----------
Date: Tue, 28 Oct 1997 09:56:52 -0800 (PST)
From: Matthew M Groener <matt@xlrn.ucsb.edu>
To: andrew@sdsu.edu
Subject: Host: Function addition to htdig

I am writing to offer a simple patch I made to htdig, which allows htdig's
server to view multiple virtual host sites (which do not use IP-based
virtual hosting). Since many sites no longer support IP-based virtual
hosts (they are too IP-intensive), this makes sense that it might be
included in an official release. From Document.cc (in htdig):

[line numbers indicate the changes: lines 317-320]
305 //
306 // If a date was provided, we'll use that in the special
307 // 'If-modified-since' URC header.
308 //
309 if (date > 0)
310 {
311 struct tm *tm = gmtime(&date);
312 char buffer[100];
313 strftime(buffer, sizeof(buffer), "%a, %d %h %Y %T GMT",tm);
314 command << "If-Modified-Since: " << buffer << "\r\n";
315 }
316
317 //
318 // 970413 - mmg - Attempt to add "Host:" header information
319 //
320 command << "Host: " << url->host() << "\r\n";
321
322 //
323 // If authorization was provided, send it. This will happen regardless of
324 // whether the server needs it or not. Oh well.
325 //
326 if (authorization.length())
327 {
328 command << "Authorization: Basic " << authorization << "\r\n";
329 }

If this doesn't make sense, let me know. I'd like to make it a feature in
future editions.

Cheers,

-matt

------------------------------------------------------------------------
Matthew Groener, matt@xlrn.ucsb.edu Phone: (805) 893-4906
Manager, Information Systems Pager: (805) 882-6170
University of California Santa Barbara, Extension Fax: (805) 893-4943
Dedicated to Lifelong Learning http://www.xlrn.ucsb.edu/
------------
Never let your schooling interfere with your education.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:25:11 PST