Re: [PATCH] htcp-off.patch

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 13 Dec 2001 00:40:20 +0100

Right. This is simply forgotten.. (the feature even documented to
exists, but does not..)

Committed. Congratulations, you are now a Squid contributor.

Miquel van Smoorenburg wrote:
>
> This patch is part of the patchset I'm using in the Debian squid-2.4.3
> package. Though the patches here are against 2.4.3, they should apply
> to 2.5 with minor difficulty.
>
> htcp-off.patch Makes it possible to turn htcp off in squid.conf
>
> This patch makes it possible to turn off HTCP at runtime,
> by setting "htcp_port 0" in squid.conf
>
> --- squid-2.4.2.orig/src/htcp.c Sun Apr 1 18:52:45 2001
> +++ squid-2.4.2/src/htcp.c Mon Oct 1 14:03:25 2001
> @@ -843,6 +843,18 @@
> void
> htcpInit(void)
> {
> + if (Config.Port.htcp <= 0) {
> + /*
> + * Need to allocate a bit of memory anyway, otherwise
> + * mem.c::memCheckInit() will bail out.
> + */
> + memDataInit(MEM_HTCP_SPECIFIER, "htcpSpecifier",
> + sizeof(htcpSpecifier), 0);
> + memDataInit(MEM_HTCP_DETAIL, "htcpDetail", sizeof(htcpDetail), 0);
> + htcpInSocket = -1;
> + debug(31, 1) ("HTCP Disabled.\n");
> + return;
> + }
> enter_suid();
> htcpInSocket = comm_open(SOCK_DGRAM,
> 0,
> @@ -890,6 +902,8 @@
> Packer pa;
> MemBuf mb;
> http_state_flags flags;
> +
> + if (htcpInSocket < 0) return;
> memset(&flags, '\0', sizeof(flags));
> snprintf(vbuf, sizeof(vbuf), "%d/%d",
> req->http_ver.major, req->http_ver.minor);
Received on Wed Dec 12 2001 - 16:53:25 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:40 MST