httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: Broken clients
Date Tue, 16 Jul 1996 20:26:43 GMT
Chuck Murcko wrote:
> 
> 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.

Cool. Only one snag... the keepalive bug afflicts Netscape 3.0b4-. I don't know
the status for the other problem (but wasn't that also a keepalive thing?).

Cheers,

Ben.

> 
> 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

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message