]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add option for enabling Host: in accel requests
authorwessels <>
Mon, 2 Dec 1996 11:15:08 +0000 (11:15 +0000)
committerwessels <>
Mon, 2 Dec 1996 11:15:08 +0000 (11:15 +0000)
src/cache_cf.cc
src/dns.cc
src/main.cc

index e011363bae5443d2185d08cabbc2ec7f280729db..bacdc102ec172541041b6109c89b9e1af387b605 100644 (file)
@@ -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();
 
index 44c44fb402df0a74791686f9be8930641305535b..18ba15f2577fbe359c17a6edbfd45fab12e89431 100644 (file)
@@ -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;
index 243bb4889dd8417129f58e3d235f73ece98e035b..8326e683ed6fa4989189fe661115b500d63ab8ff 100644 (file)
@@ -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()) */