Wed Dec 22 00:14:41 CET 1999 Modified Files in squid/src cf.data.pre forward.c structs.h Added httpd_accel_single_host for forcing Squid in accelerator mode to use one backend server name even if supporting multiple virtual domains. Index: squid/src/cf.data.pre diff -u squid/src/cf.data.pre:1.1.1.41.2.9 squid/src/cf.data.pre:1.1.1.41.2.11 --- squid/src/cf.data.pre:1.1.1.41.2.9 Sun Dec 12 18:44:08 1999 +++ squid/src/cf.data.pre Wed Dec 22 00:12:59 1999 @@ -1997,6 +1997,26 @@ httpd_accel_port port DOC_END +NAME: httpd_accel_single_host +COMMENT: on|off +TYPE: onoff +LOC: Config.Accel.single_host +DEFAULT: on +DOC_START + If you are running Squid as a accelerator and have a single backend + server then set this to on. This causes Squid to forward the request + to this server irregardles of what any redirectors or Host headers + says. + + Set this to off if you have multiple backend servers, and use a + redirector (or host table) to map the requests to the + appropriate backend servers. Note that the mapping needs to be a + 1-1 mapping between requested and backend (from redirector) domain + names or caching will fail, as cacing is performed using the + URL returned from the redirector. + + See also redirect_rewrites_host_header. +DOC_END NAME: httpd_accel_with_proxy COMMENT: on|off Index: squid/src/forward.c diff -u squid/src/forward.c:1.1.1.17.2.2 squid/src/forward.c:1.1.1.17.2.4 --- squid/src/forward.c:1.1.1.17.2.2 Sat Oct 30 22:30:08 1999 +++ squid/src/forward.c Wed Dec 22 00:14:41 1999 @@ -241,6 +241,11 @@ port = fs->peer->http_port; ctimeout = fs->peer->connect_timeout > 0 ? fs->peer->connect_timeout : Config.Timeout.peer_connect; + } else if (fwdState->request->flags.accelerated && + Config.Accel.single_host && Config.Accel.host) { + host = Config.Accel.host; + port = Config.Accel.port; + ctimeout = Config.Timeout.connect; } else { host = fwdState->request->host; port = fwdState->request->port; Index: squid/src/structs.h diff -u squid/src/structs.h:1.1.1.42.2.6 squid/src/structs.h:1.1.1.42.2.7 --- squid/src/structs.h:1.1.1.42.2.6 Sat Nov 27 01:25:27 1999 +++ squid/src/structs.h Wed Dec 22 00:02:23 1999 @@ -321,6 +321,7 @@ int authenticateTTL; int authenticateIpTTL; struct { + int single_host; char *host; u_short port; } Accel;