Received: by taz.hyperreal.com (8.6.12/8.6.5) id NAA28716; Tue, 16 Jul 1996 13:27:43 -0700 Received: from battra.telebase.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id NAA28677; Tue, 16 Jul 1996 13:27:38 -0700 Received: from wormhole.telebase.com by battra.telebase.com id QAA18601 for ; Tue, 16 Jul 1996 16:27:39 -0400 (EDT) Received: from spudboy.telebase.com (spudboy.telebase.com [172.16.2.215]) by wormhole.telebase.com (8.7.4/8.6.9.1) with ESMTP id QAA07711 for ; Tue, 16 Jul 1996 16:27:38 -0400 (EDT) Received: (from chuck@localhost) by spudboy.telebase.com (8.7.5/8.6.9.1) id QAA09201 for new-httpd@hyperreal.com; Tue, 16 Jul 1996 16:27:38 -0400 (EDT) From: Chuck Murcko Message-Id: <199607162027.QAA09201@telebase.com.> Subject: Re: Broken clients To: new-httpd@hyperreal.com Date: Tue, 16 Jul 1996 16:27:38 -0400 (EDT) In-Reply-To: <9607161938.aa27693@gonzo.ben.algroup.co.uk> from "Ben Laurie" at Jul 16, 96 07:38:07 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Ben Laurie liltingly intones: > > OK, it seems we now have two reasons to detect broken clients. One is to avoid > flushing after the headers, the other to disable keepalive. Does anyone have > a recipe for detecting those clients? > The following code at the beginning of set_keepalive() should take care of that part: int set_keepalive(request_rec *r) { char *conn = table_get (r->headers_in, "Connection"); char *length = table_get (r->headers_out, "Content-length"); char *agent; agent = table_get(r->headers_in, "User-Agent"); if(strncmp(agent, "Mozilla/2", 9) == 0) return 0; ... Same could go into send_http_header() agent = table_get(r->headers_in, "User-Agent"); if (c->keepalive && strncmp(agent, "Mozilla/2", 9) == 0) bflush(r->connection->client); /* For bugs in Netscape, perhaps */ unless we wanted a check_for_bogus_mozilla() added to http_protocol.c for this purpose... chuck Chuck Murcko N2K Inc. Wayne PA chuck@telebase.com And now, on a lighter note: Lie, n.: A very poor substitute for the truth, but the only one discovered to date.