From: wessels <> Date: Mon, 2 Dec 1996 11:15:08 +0000 (+0000) Subject: Add option for enabling Host: in accel requests X-Git-Tag: SQUID_3_0_PRE1~5362 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0dc8ff75f1c06b7d98fefb7cb88cecc726881ce1;p=thirdparty%2Fsquid.git Add option for enabling Host: in accel requests --- diff --git a/src/cache_cf.cc b/src/cache_cf.cc index e011363bae..bacdc102ec 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,5 +1,5 @@ /* - * $Id: cache_cf.cc,v 1.148 1996/12/01 00:51:54 wessels Exp $ + * $Id: cache_cf.cc,v 1.149 1996/12/02 04:15:08 wessels Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -1112,6 +1112,9 @@ parseConfigFile(const char *file_name) else if (!strcmp(token, "httpd_accel_with_proxy")) parseOnOff(&Config.Accel.withProxy); + else if (!strcmp(token, "httpd_accel_uses_host_header")) + parseOnOff(&opt_accel_users_host); + else if (!strcmp(token, "httpd_accel")) parseHttpdAccelLine(); diff --git a/src/dns.cc b/src/dns.cc index 44c44fb402..18ba15f257 100644 --- a/src/dns.cc +++ b/src/dns.cc @@ -1,5 +1,5 @@ /* - * $Id: dns.cc,v 1.24 1996/11/14 18:38:41 wessels Exp $ + * $Id: dns.cc,v 1.25 1996/12/02 04:15:09 wessels Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived @@ -173,12 +173,16 @@ dnsOpenServer(const char *command) return -1; } memset(buf, '\0', 128); - errno = 0; - if (read(sfd, buf, 128) < 0 || strcmp(buf, "$alive\n$end\n")) { + if (read(sfd, buf, 127) < 0) { debug(50, 0, "dnsOpenServer: $hello read test failed\n"); debug(50, 0, "--> read: %s\n", xstrerror()); comm_close(sfd); return -1; + } else if (strcmp(buf, "$alive\n$end\n")) { + debug(50, 0, "dnsOpenServer: $hello read test failed\n"); + debug(50, 0, "--> got '%s'\n", rfc1738_escape(buf)); + comm_close(sfd); + return -1; } comm_set_fd_lifetime(sfd, -1); return sfd; diff --git a/src/main.cc b/src/main.cc index 243bb4889d..8326e683ed 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* - * $Id: main.cc,v 1.120 1996/12/01 00:19:00 wessels Exp $ + * $Id: main.cc,v 1.121 1996/12/02 04:15:10 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -123,6 +123,7 @@ static int opt_send_signal = -1; /* no signal to send */ int opt_udp_hit_obj = 1; int opt_mem_pools = 1; int opt_forwarded_for = 1; +int opt_accel_uses_host = 0; int vhost_mode = 0; volatile int unbuffered_logs = 1; /* debug and hierarchy unbuffered by default */ volatile int shutdown_pending = 0; /* set by SIGTERM handler (shut_down()) */