[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Make mod_authz_svn to apply the authz checks against upper/lowercased usernames

From: Daniel L. Rall <dlr_at_finemaltcoding.com>
Date: Thu, 13 Mar 2008 14:16:56 -0800

On Thu, 13 Mar 2008, Kamesh Jayachandran wrote:

>
> >I have some simplifications for that (attached, untested).
> >
> > while (*c) {
> >- *c = convert_func(*c);
> >+ *c = (to_uppercase ? apr_toupper(*c) : apr_tolower(*c));
> > ++c;
>
>
> I thought of this approach, but stayed away from it as 'to_upper check'
> happens for every character in a loop.

So? It's a single boolean check. The gain in simplicity far outweighs any
micro-optimization.

  • application/pgp-signature attachment: stored
Received on 2008-03-13 23:15:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.