Received: by taz.hyperreal.com (8.7.5/V2.0) id QAA03991; Fri, 16 Aug 1996 16:34:15 -0700 (PDT) Received: from acidik.organic.com by taz.hyperreal.com (8.7.5/V2.0) with ESMTP id QAA03986; Fri, 16 Aug 1996 16:34:10 -0700 (PDT) Received: from localhost (akosut@localhost) by acidik.organic.com (8.7.5/8.6.12) with SMTP id QAA09203 for ; Fri, 16 Aug 1996 16:38:42 -0700 (PDT) X-Authentication-Warning: acidik.organic.com: akosut owned process doing -bs Date: Fri, 16 Aug 1996 16:38:41 -0700 (PDT) From: Alexei Kosut To: new-httpd@hyperreal.com Subject: Re: hook to an API function on fork() In-Reply-To: <199608162303.AAA01899@aaaaaaaa.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@hyperreal.com On Sat, 17 Aug 1996, Andrew Wilson wrote: > > This is a Bad Idea. > > Ah, so that's why. Hmm. I could have *sworn* I explained that sentance. *sigh* My brian's gone, I guess. Okay. What I meant by that is the same thing RST said the first time that you brought this up; overloading the handler semantics like that isn't a very clean interface, it has a great potential for confusion, and sets a bad precedent. In addition, it slows the server down - for each check added in that way, it means you have to do a string match of each handler. One time for actually handling the files is fine. Doing it lots of times, especially when you may not be likely to find an appropriate string, is not. Adding a function pointer to a lookup table somehow (whether via another entry in module_rec, or via an api_register() function like you suggested), is vastly perferably, because it is a lot faster to simply go through a list of pointers and check for non-NULL ones. Hopefully, that's less cryptic than my original statement. -- Alexei Kosut The Apache HTTP Server http://www.nueva.pvt.k12.ca.us/~akosut/ http://www.apache.org/