You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "William A. Rowe, Jr." <wr...@covalent.net> on 2001/10/01 05:25:38 UTC
Re: cvs commit: httpd-2.0/server request.c
I will look at this in the morning, certainly makes sense without
digging in just yet. I will definately apply Cliff's suggestion,
if nothing else :)
Thanks for tracking this down, Justin!
----- Original Message -----
From: "Justin Erenkrantz" <je...@ebuilt.com>
To: <de...@httpd.apache.org>
Sent: Saturday, September 29, 2001 11:26 AM
Subject: Re: cvs commit: httpd-2.0/server request.c
> On Sat, Sep 29, 2001 at 12:01:33PM -0400, Cliff Woolley wrote:
> > On 29 Sep 2001 jerenkrantz@apache.org wrote:
> >
> > > if (strncmp(rnew->filename, fdir, fdirlen) == 0
> > > && rnew->filename[fdirlen]
> > > - && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL)
> > > + && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL
> > > + && strlen(r->uri) != 0)
> >
> > Might I suggest "&& r->uri[0] != '\0'" or some such? You don't really
> > need the string's length, just whether it's zero or not. Constant time
> > instead of linear is always nice. =-)
>
> Ah, yes, that'd be better. But, I have a feeling OtherBill will be
> reverting it, so I won't muck anymore with it. If he says it is
> the right thing to do, then we can change it to that... -- justin
>
>