Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04ABCDFAE for ; Sat, 18 Aug 2012 16:33:17 +0000 (UTC) Received: (qmail 96243 invoked by uid 500); 18 Aug 2012 16:33:16 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 96219 invoked by uid 500); 18 Aug 2012 16:33:16 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 96211 invoked by uid 99); 18 Aug 2012 16:33:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2012 16:33:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of covener@gmail.com designates 209.85.217.173 as permitted sender) Received: from [209.85.217.173] (HELO mail-lb0-f173.google.com) (209.85.217.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2012 16:33:09 +0000 Received: by lbbgm13 with SMTP id gm13so3177031lbb.18 for ; Sat, 18 Aug 2012 09:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dSfv6LXWcf1j2FRUfth7f2nmCONYNYDt1LjrJtBqzew=; b=igDVfiv62e80CEGgf4pn2gAkIBu0wzFtZfT9unmBtt/p5roOOx6T/SPwsZIBdn/sa3 XjoR8/He9k1Imd8r1nnmcHMo0s8v2ku3wed+J3lnQWPemsMQSz+1rGzq/7lUSRbXfeam Vma//UryV/9vLiGC2R6lQf48j0b2M/2/Lp62RDSdM1hEzpA0un0CrbsbNaaQQsEkW/XE TEnyMQnxPJsvtpKqw0iNnewYZZrwEloRtwMUY48qMdFBQws7r0zuhZ588U8wj25/lCm5 Rs8qnZzrEZMEMuqbqEzpbtngRlfZviqkS9TeC74IvLdOdUJFmy4us2Vfgn94k0kyrDSJ jZDA== MIME-Version: 1.0 Received: by 10.112.31.197 with SMTP id c5mr3879849lbi.50.1345307568845; Sat, 18 Aug 2012 09:32:48 -0700 (PDT) Received: by 10.112.29.229 with HTTP; Sat, 18 Aug 2012 09:32:48 -0700 (PDT) In-Reply-To: References: <08EAED86-3D73-44EE-B31F-70B4822688EB@apache.org> Date: Sat, 18 Aug 2012 12:32:48 -0400 Message-ID: Subject: Re: best way to return the content of a file From: Eric Covener To: modules-dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 > i'm enabling my module with a Location directive: > > > SetHandler kcache > > > and i want to control the execution of the module with an initial check: > > if (!r->handler || strcmp(r->handler, "kcache")) return (DECLINED); > > but r->handler is null if the hook is called in ap_hook_translate_name > state, so how can i check this condition? You can't check that condition early. You should implement a directive to enable your module in these early phases.