From owner-freebsd-current@FreeBSD.ORG Thu Dec 28 00:47:39 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9EB4816A415; Thu, 28 Dec 2006 00:47:39 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id 7057B13C479; Thu, 28 Dec 2006 00:47:39 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id DB9565D95; Wed, 27 Dec 2006 19:47:38 -0500 (EST) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mm7m8+o3iS3S; Wed, 27 Dec 2006 19:47:36 -0500 (EST) Received: from [192.168.1.251] (pool-68-161-114-230.ny325.east.verizon.net [68.161.114.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 456FA5C31; Wed, 27 Dec 2006 19:47:36 -0500 (EST) Message-ID: <45931424.8060602@mac.com> Date: Wed, 27 Dec 2006 19:47:32 -0500 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Colin Percival References: <20061210010823.GS81923@egr.msu.edu> <20061214172323.GP1011@egr.msu.edu> <45908ED3.4040503@freebsd.org> <200612261129.48173.max@love2party.net> <459192A9.2050808@freebsd.org> <4592FF0A.1080400@mac.com> <45930A5D.1080602@freebsd.org> In-Reply-To: <45930A5D.1080602@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: Fwd: Re: pf: BAD state happens often with portsnap fetch update X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2006 00:47:39 -0000 Colin Percival wrote: > Chuck Swiger wrote: >> FYI, if you pass a: >> >> Connection: keep-alive >> >> ...header in the request, Squid will not close the client->proxy >> connection and you ought to be able to re-use it to make additional >> requests. > > In HTTP/1.1, connections are assumed to be persistent unless declared otherwise. Yeah. >> PS: Squid "supports HTTP/1.0 persistent connections", from which the HTTP/1.1 >> style keepalives derive-- and quick testing suggests these persistent >> connections work with either HTTP/1.0 or 1.1 specified in the request. > > Grr. I hate adding workarounds to improve compatibility with hopelessly > antique code (seriously, why doesn't squid support http/1.1 yet?), See src/HttpMsg.c and/or grep for proxy_keepalive: /* returns true if connection should be "persistent" * after processing this message */ int httpMsgIsPersistent(http_version_t http_ver, const HttpHeader * hdr) { #if WHEN_SQUID_IS_HTTP1_1 if ((http_ver.major >= 1) && (http_ver.minor >= 1)) { /* * for modern versions of HTTP: persistent unless there is * a "Connection: close" header. */ return !httpHeaderHasConnDir(hdr, "close"); } else { #else [ ... ] > but I guess I'll make phttpget emit a completely bogus "Connection: Keep-Alive" > header to go along with its HTTP/1.1 requests. There are lots of proxies and firewalls which restrict connections to HTTP/1.0 behavior besides Squid. It's not that horrible to have to request persistent connections explicitly if it solves the problem...and I hope it does. -- -Chuck