Received: by taz.hyperreal.com (8.7.6/V2.0) id GAA25012; Wed, 9 Oct 1996 06:23:48 -0700 (PDT) Received: from arachnet.algroup.co.uk by taz.hyperreal.com (8.7.6/V2.0) with SMTP id GAA25006; Wed, 9 Oct 1996 06:23:45 -0700 (PDT) Received: from heap.ben.algroup.co.uk by arachnet.algroup.co.uk id aa14012; 9 Oct 96 14:22 BST Received: from gonzo.ben.algroup.co.uk by heap.ben.algroup.co.uk id aa25341; 9 Oct 96 13:33 BST Subject: Re: cvs commit: apache/src mod_access.c To: new-httpd@hyperreal.com Date: Wed, 9 Oct 1996 13:26:40 +0100 (BST) From: Ben Laurie In-Reply-To: <199610091213.NAA00489> from "Rob Hartill" at Oct 9, 96 01:13:15 pm X-Mailer: ELM [version 2.4 PL24 PGP2] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <9610091326.aa20790@gonzo.ben.algroup.co.uk> Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com Rob Hartill wrote: > > > Re: deny from user-agents > > Ben Laurie wrote: > > > >I still don't think we have reached consensus on whether this patch should use > >BrowserMatch. I am strongly of the opinion that it should. If others agree then > >this would become an environment variable match instead of a user agent match, > >and would, therefore, be a considerably more general facility. I'm happy to > >make the changes... I think! Don't forget that BrowserMatch uses REs, which are > >much more powerful than strstr, so there is an advantage even in this limited > >case. > > I haven't looked at BrowserMatch. Can you please explain how it'd work in > terms of allowing/denying access based on UA and on a per > Directory/Location/File basis. OK. BrowserMatch matches the user agent against an RE, and, if matched, sets a specified environment variable. The change to allow/deny would be trivial - instead of matching the user agent, you test for the presence of an environment variable. As in... BrowserMatch ^Mozilla/[12] stayaway deny from env stayaway or similar. > > If it can cover all the same requirements and have a regexp capability > then that's great. I can't see any problem, but I may have missed something. Cheers, Ben. -- Ben Laurie Phone: +44 (181) 994 6435 Freelance Consultant and Fax: +44 (181) 994 6472 Technical Director Email: ben@algroup.co.uk A.L. Digital Ltd, URL: http://www.algroup.co.uk London, England. Apache Group member (http://www.apache.org)