Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 23621 invoked by uid 6000); 21 May 1998 01:11:52 -0000 Received: (qmail 23614 invoked from network); 21 May 1998 01:11:51 -0000 Received: from scanner.worldgate.com (198.161.84.3) by taz.hyperreal.org with SMTP; 21 May 1998 01:11:51 -0000 Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.7/8.8.7) with UUCP id TAA27574 for new-httpd@apache.org; Wed, 20 May 1998 19:11:48 -0600 (MDT) Received: from localhost (marcs@localhost) by alive.znep.com (8.7.5/8.7.3) with SMTP id SAA08419 for ; Wed, 20 May 1998 18:50:57 -0600 (MDT) Date: Wed, 20 May 1998 18:50:57 -0600 (MDT) From: Marc Slemko To: new-httpd@apache.org Subject: Re: cvs commit: apache-1.3/src/modules/standard mod_log_referer.c In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org On Wed, 20 May 1998, Brian Behlendorf wrote: > > > On Wed, 20 May 1998, Dean Gaudet wrote: > > On 20 May 1998 brian@hyperreal.org wrote: > > > > > @@ -175,7 +176,7 @@ > > > referer = ap_table_get(orig->headers_in, "Referer"); > > > if (referer != NULL) { > > > > > > - > > > + ap_str_tolower(referer); > > > /* The following is an upsetting mess of pointers, I'm sorry > > > Anyone with the motiviation and/or the time should feel free > > > to make this cleaner... */ > > > > -1. This patch is broken. You cannot downcase the value you get from > > table_get()... the values in all tables are constants. You should replace > > the to str_tolower()s with a single strcasecmp() or whatever. > > The comparison is a strstr though; so far as I know there isn't a > strcasestr available. I suppose I can use regex... or just create a > new buffer. > > Odd that the patch seemed to work fine, no compile errors and testing > showed it did the job... Except that if you check the referer after the fact in some other module, etc. you will find that it has been modified. That is bad.