www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronald.Tschal...@psi.ch (Life is hard... and then you die.)
Subject Re: mod_negotiation/1772: Can't handle both "Accept-Encoding: gzip" and "Accept-Encoding: x-gzip"
Date Fri, 06 Feb 1998 06:30:00 GMT
The following reply was made to PR mod_negotiation/1772; it has been noted by GNATS.

From: Ronald.Tschalaer@psi.ch (Life is hard... and then you die.)
To: dgaudet@arctic.org,
    APBUGS@hyperreal.org,
    FIELDING@kiwi.ics.uci.edu
Cc:  Subject: Re: mod_negotiation/1772: Can't handle both "Accept-Encoding: gzip" and "Accept-Encoding:
x-gzip" 
Date: Fri, 6 Feb 1998 05:10:10 +0200

  
 > On Thu, 5 Feb 1998, Roy T. Fielding wrote:
 >
 > > >> !         if (!strncmp(name, "x-", 2))
 > >
 > > sucks performance-wise when compared to
 > >
 > >              if (name[1] == '-' && (name[0] == 'x' || name[0] == 'X'))
 >
 > Heh.  This is exactly what I did in my working copy of Ronald's patch
 > already.
  
 Err, yes, I agree with both of you. I'll try to be less lazy next time...
  
 > Actually I think in mod_negotiation we're guaranteed that everything is
 > lower case.  I need to double check that again... it seemed to be correct
 > when I was looking at case-sensitivity.
  
 As far as I could see the code is fine in that respect (I would've sent
 in another patch otherwise ;-).
  
 I just noticed that I had not quite fixed everything - I forgot about
 mod_autoindex which also uses content-encoding (in AddIconByEncoding).
 So here is the patch for mod_autoindex, including a fix for
 case-sensitivity.
 
 
   Cheers,
 
   Ronald
 
 ---------------------------------------------------------------------
 *** mod_autoindex.c.orig	Wed Nov 12 22:37:45 1997
 --- mod_autoindex.c	Fri Feb  6 04:56:34 1998
 ***************
 *** 176,181 ****
 --- 176,187 ----
       if (cmd->info == BY_PATH)
   	if (!strcmp(to, "**DIRECTORY**"))
   	    to = "^^DIRECTORY^^";
 +     if (cmd->info == BY_ENCODING) {
 + 	str_tolower(to);
 + 	if (to[0] == 'x' && to[1] == '-') {
 + 	    to += 2;
 + 	}
 +     }
   
       push_item(((autoindex_config_rec *) d)->alt_list, cmd->info, to, cmd->path,
alt);
       return NULL;
 ***************
 *** 193,198 ****
 --- 199,210 ----
       if (cmd->info == BY_PATH)
   	if (!strcmp(to, "**DIRECTORY**"))
   	    to = "^^DIRECTORY^^";
 +     if (cmd->info == BY_ENCODING) {
 + 	str_tolower(to);
 + 	if (to[0] == 'x' && to[1] == '-') {
 + 	    to += 2;
 + 	}
 +     }
   
       push_item(((autoindex_config_rec *) d)->icon_list, cmd->info, to, cmd->path,
   	      iconbak);
 ---------------------------------------------------------------------
 

Mime
View raw message