httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@telebase.com>
Subject Re: Broken clients
Date Tue, 16 Jul 1996 20:51:29 GMT
Chuck Murcko liltingly intones:
> 
> In the second case, though, it may be *all* Netscapes have trouble with the
> headers, so you'd just check for "Mozilla/".
> 
> Chuck Murcko liltingly intones:
> > 
> > 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?
> > > 
> > 
>

Actually, it's easier to do this in send_http_header():

void send_http_header(request_rec *r)
{
    conn_rec *c = r->connection;
    BUFF *fd = c->client;
    const long int zero=0L;
    array_header *hdrs_arr;
    table_entry *hdrs;
    int i, is_agent_mozilla2;
    char *agent;

    core_dir_config *dir_conf =
      (core_dir_config *)get_module_config(r->per_dir_config, &core_module);
    char *default_type = dir_conf->default_type;
        
    agent = table_get(r->headers_in, "User-Agent");
    is_agent_mozilla2 = strncmp(agent, "Mozilla/2", 9);

    ...

    if(!is_agent_mozilla2)
        set_keepalive (r);       

    ...

    if (c->keepalive && !is_agent_mozilla2)
        bflush(r->connection->client);  /* For bugs in Netscape, perhaps */
    
    ...
}

This also takes care of John's first point re: keepalive performance.

chuck
Chuck Murcko	N2K Inc.	Wayne PA	chuck@telebase.com
And now, on a lighter note:
You can learn many things from children.  How much patience you have,
for instance.
		-- Franklin P. Jones

Mime
View raw message