Re: URL_REGEX case insensitive?

From: Kevin Fink <kevin@dont-contact.us>
Date: Fri, 9 May 1997 21:59:54 -0700 (PDT)

On Tue, 6 May 1997, Arjan de Vet wrote:

> Kevin Fink:
>
> >Splay trees are just a fancy way of building binary trees. Since acls are
> >not dynamic once they have been loaded, splay trees are a waste of time.
>
> >In addition, simple binary trees are a very inefficient way of searching
> >URLs. They will certainly be better than a linear linked list, but not
>
> That depends on what you mean exactly by URL. If you want to block complete
> sites you can use the names. A (balanced) binary tree with names is in my
> opinion rather efficient.

Yes, you are correct. That assumes you want to block complete sites by
name, though. IMHO, not a good way to block complete sites, at least in
most cases. bytes(dirty.slut.com) = 22 >> bytes(206.139.179.68) = 4 for
one thing. For another, in many cases ftp.dirty.slut.com =
www.dirty.slut.com = dirty.slut.com = 206.139.179.68 = ..., so blocking by
name can require an awful lot of memory.

Balanced binary trees are good for handling strings, though, no doubt
about it. Using the right tool for the right job is important, and if you
can break your problem down into separate chunks, you can often end up
with a very good solution.

> If you want to search on URL regex's (e.g. blocking partial sites), that's
> indeed a problem.

Well, that's a problem no matter how you hash the list, but it isn't too
difficult to take care of. Assuming you don't mind ugly data structures,
that is...

Kevin

------------------------------------------------------------------------------
 Kevin Fink <kevin@fink.com> N2H2, Creators of Bess
 http://www.fink.com/ 1301 Fifth Avenue, Suite 1501
 http://www.n2h2.com/ Seattle, WA 98101
------------------------------------------------------------------------------
 (206) 971-1400 VOICE (206) 971-1460 FAX (206) 680-7666 PAGER
------------------------------------------------------------------------------
Received on Fri May 09 1997 - 22:02:08 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:35:09 MST