httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <>
Subject Re: Broken clients
Date Tue, 16 Jul 1996 20:27:38 GMT
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 Murcko	N2K Inc.	Wayne PA
And now, on a lighter note:
Lie, n.:
	A very poor substitute for the truth, but the only one
discovered to date.

View raw message