httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@liege.ICS.UCI.EDU>
Subject Re: Broken clients
Date Wed, 17 Jul 1996 04:42:05 GMT
> 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 */
>     
>     ...
> }

Ummm, isn't that redundant?  I mean first not setting keepalive and
then also checking is_agent_mozilla2 after checking keepalive.  I'd think
only the first was needed, but I may be confused.

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

Yep, I forgot to mention that -- we can take out the flush entirely
because is_agent_mozilla2 wouldn't be kept alive [muahahaha...now all
we need is a picture of a lizard on a roasting stick...].

BTW, I am inclined to allow any bugs in 3.0beta clients to be visible
(if they exist), since that is the only way they'll get fixed.  If 3.0 final
also has the bug(s), then we can kill the whole Mozilla family.
However, people running commercial sites (i.e., slaves to the wheel)
may have a different opinion of how best to support their customers,
so I wouldn't mind having an IFDEF for the string to match and tell
people to "adjust it accordingly".

.....Roy

Mime
View raw message