Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 69236 invoked from network); 12 Aug 2007 22:13:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2007 22:13:46 -0000 Received: (qmail 87391 invoked by uid 500); 12 Aug 2007 22:13:43 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 87371 invoked by uid 500); 12 Aug 2007 22:13:43 -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 87362 invoked by uid 99); 12 Aug 2007 22:13:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 15:13:43 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [199.108.77.30] (HELO emx.pixar.com) (199.108.77.30) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 22:13:39 +0000 X-IronPort-AV: E=Sophos;i="4.19,251,1183359600"; d="scan'208";a="59455895" Received: from pool-021.svpn.pixar.com (HELO relish.local) ([138.72.243.21]) by iris.pixar.com with ESMTP; 12 Aug 2007 15:13:19 -0700 Message-ID: <46BF85EE.50801@pixar.com> Date: Sun, 12 Aug 2007 15:13:02 -0700 From: Mark Harrison User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: why is my module being called for all pages? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org warning: newbie alert! I've got a simple module as detailed below. I based it off of the example module, stripping it down to the smallest example I could. It seems to be working, but it is getting called on all web pages. Can someone loan me a clue as to: 1. why it is being called on all pages, not just the one I've specified in ? 2. what do I need to do to fix it? Many TIA! Mark ### httpd.conf ### I expect the that http://localhost/kaptest to trigger ### but not http://localhost/somewhere_else ### LoadModule kap_module modules/mod_kap.so SetHandler kap-handler /* mod_kap.c -- simple handler */ /*headers as per mod_example */ module AP_MODULE_DECLARE_DATA kap_module; static int kap_handler(request_rec *r) { ap_set_content_type(r, "text/plain"); ap_rprintf(r, "kap_handler: time=%d\n", time(NULL)); return OK; } static void kap_register_hooks(apr_pool_t *p) { ap_hook_handler(kap_handler, NULL, NULL, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA kap_module = { STANDARD20_MODULE_STUFF, NULL, /* per-directory config creator */ NULL, /* dir config merger */ NULL, /* server config creator */ NULL, /* server config merger */ NULL, /* command table */ kap_register_hooks, /* set up other request processing hooks */ }; /* eof: mod_kap.c */ -- Mark Harrison Pixar Animation Studios