Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id KAA26173; Thu, 21 Aug 1997 10:25:59 -0700 (PDT) Received: from twinlark.arctic.org (twinlark.arctic.org [204.62.130.91]) by hyperreal.org (8.8.5/8.8.5) with SMTP id KAA26159 for ; Thu, 21 Aug 1997 10:25:55 -0700 (PDT) Received: (qmail 22057 invoked by uid 500); 21 Aug 1997 16:49:59 -0000 Date: Thu, 21 Aug 1997 09:49:59 -0700 (PDT) From: Dean Gaudet To: new-httpd@apache.org Subject: Re: Tristate responses from module hooks In-Reply-To: <97082111034374@decus.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org A pain, but not impossible, to implement because it requires extra state to be kept for the array of function pointers. Dean On Thu, 21 Aug 1997, Rodent of Unusual Size wrote: > I proposed this once before, but I don't think it resulted in any > discussion. If that happens this time too, I'll take the hint. > > How about adding another response possible from module request-phase > hooks: OK, DECLINED, and NEXT_PASS (or whatever)? > > The idea is to allow modules (such as mod_rewrite) to say, "I've > done what I want to do, but I feel compelled to take a look at what > any other you call after me modules do to make sure they don't > scroodle me." > > The module-hook caller would make a note of the response from each > module: > > 1. If none return NEXT_PASS, we're finished. > 2. If any return NEXT_PASS, watch for subsequent ones returning OK > or NEXT_PASS. If none do, we're finished. > 3. Start over at the first NEXT_PASS hook, and re-call any that > returned NEXT_PASS or OK the last time. If the results are the > same as last time, return a server error (probably a deadlock). > 4. Repeat [3] until everything returns either OK or DECLINED. > > There are probably flaws with this sequence. Modules that want to > use the call-me-if-anything-changes mechanism would need to maintain > some sort of state, probably in the r->notes table. > > Just a wild idea, probably started by thinkos from that high-energy > particle bombardment I accidentally wandered through.. > > #ken :-)} >