why is my module being called for all pages?
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 Location? 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 Location /kaptest SetHandler kap-handler /Location /* 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
Re: why is my module being called for all pages?
On 8/12/07, Mark Harrison [EMAIL PROTECTED] wrote: 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 Location? that's to be expected. 2. what do I need to do to fix it? you have to compare the request_rec-handler field to the handler name you specified in the config with the SetHandler directive. For example, if you have: Location /mylocation SetHandler myhandler /Location in your config, then your module will need to do something like this in whatever function you registered as the handler function: if (strcmp(r-handler, myhandler)) { return DECLINED; } Frank
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs for review
On 08/11/2007 01:49 AM, Jim Jagielski wrote: Available for your testing pleasure, 3, count 'em, 3 Apache HTTP Server release candidate tarballs, located, as expected at: http://httpd.apache.org/dev/dist/ This vote will run through August 14, 2007... +/-1 (x == +1) [ ]apache_1.3.28 [ ]httpd-2.0.60 [ ]httpd-2.2.5 -1 from me on 2.0.60 as the test framework revealed regressions compared to 2.0.59: 2.0.59: Failed TestStat Wstat Total Fail Failed List of Failed --- t/modules/cgi.t 58 21 36.21% 14 16 32 34 36 38 40 42 44 46-49 51-58 t/security/CVE-2006-5752.t21 50.00% 2 t/ssl/basicauth.t 32 66.67% 2-3 t/ssl/env.t 30 15 50.00% 16-30 t/ssl/pr12355.t 108 80.00% 1-8 t/ssl/proxy.t 172 118 68.60% 1-59 114-172 t/ssl/require.t 52 40.00% 2 5 t/ssl/varlookup.t72 72 100.00% 1-72 t/ssl/verify.t31 33.33% 2 (1 subtest UNEXPECTEDLY SUCCEEDED), 13 tests and 28 subtests skipped. Failed 9/77 test scripts, 88.31% okay. 240/2817 subtests failed, 91.48% okay. 2.0.60: Failed Test Stat Wstat Total Fail Failed List of Failed --- t/modules/access.t408 31 7.60% 4 20-21 24 26 28 30 38 55 72 89 106-107 123-124 141 154 168 170 175 192 209 226 277 290 304 306 311 328 345 362 t/modules/cgi.t58 21 36.21% 14 16 32 34 36 38 40 42 44 46-49 51-58 t/modules/setenvif.t 111 18 16.22% 7-9 13-15 19-21 25-27 31-33 37-39 t/ssl/basicauth.t 32 66.67% 2-3 t/ssl/env.t30 15 50.00% 16-30 t/ssl/proxy.t 172 118 68.60% 1-59 114-172 t/ssl/require.t 52 40.00% 2 5 t/ssl/varlookup.t 72 72 100.00% 1-72 t/ssl/verify.t 31 33.33% 2 (1 subtest UNEXPECTEDLY SUCCEEDED), 13 tests and 28 subtests skipped. Failed 9/77 test scripts, 88.31% okay. 280/2817 subtests failed, 90.06% okay. These regression are caused by an apr problem. 2.0.59 is shipped with apr 0.9.12 whereas 2.0.60 is shipped with apr 0.9.14. The regressions are caused by r442526 and r443264 which are backports of r442135 and r443262 from apr trunk.. These revisions change apr_socket_accept in network_io/unix/sockets.c. Why does this not happen with apr trunk / 1.2.x? On apr trunk we have r447894. Backporting this patch to 0.9.14 fixes the regressions. On apr 1.2.x the backports of r442135 and r443262 have been reverted in r473681. So I guess we either have to ship 2.0.x with an older release of apr 0.9.x or we have to wait for a new release of apr 0.9.x that fixes this problem. Regards Rüdiger
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs for review
On 08/11/2007 01:49 AM, Jim Jagielski wrote: Available for your testing pleasure, 3, count 'em, 3 Apache HTTP Server release candidate tarballs, located, as expected at: http://httpd.apache.org/dev/dist/ This vote will run through August 14, 2007... +/-1 (x == +1) [ ]apache_1.3.28 [ ]httpd-2.0.60 [ ]httpd-2.2.5 +1 from me on httpd-2.2.5: 1. Signature and md5sum ok for httpd-2.2.5.tar.gz / httpd-2.2.5.tar.bz2 2. Compiles fine and starts on Solaris 8: gcc (GCC) 3.3.2 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. OpenSSL 0.9.8d 28 Sep 2006 3. Compiles fine on Solaris 9: gcc (GCC) 3.3.2 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. OpenSSL 0.9.8d 28 Sep 2006 Failed TestStatus Wstat Total Fail Failed List of Failed t/apache/pr18757.t 9 2304 32 66.67% 2-3 t/modules/deflate.t 255 65280?? ?? % ?? t/modules/proxy.t255 65280?? ?? % ?? t/modules/rewrite.t 255 65280?? ?? % ?? t/security/CVE-2004-0959.t 2 512?? ?? % ?? t/security/CVE-2005-3357.t 255 65280?? ?? % ?? 21 tests skipped. Failed 6/63 test scripts, 90.48% okay. 2/1579 subtests failed, 99.87% okay. No regressions to 2.2.4. 4. Compiles fine on SuSE Linux 32 Bit: gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Linux euler 2.6.18.8-0.5-ruediger-20070715 #1 PREEMPT Sun Jul 15 10:44:38 CEST 2007 i686 athlon i386 GNU/Linux glibc-2.5-25 openSUSE 10.2 (i586) VERSION = 10.2 OpenSSL 0.9.8d 28 Sep 2006 openssl-0.9.8d-23.1 Failed Test Stat Wstat Total Fail Failed List of Failed --- t/ssl/basicauth.t32 66.67% 2-3 t/ssl/env.t 30 15 50.00% 16-30 t/ssl/extlookup.t22 100.00% 1-2 t/ssl/fakeauth.t 32 66.67% 2-3 t/ssl/proxy.t 172 118 68.60% 1-59 114-172 t/ssl/require.t 52 40.00% 2 5 t/ssl/varlookup.t 72 72 100.00% 1-72 t/ssl/verify.t 31 33.33% 2 7 tests and 18 subtests skipped. Failed 8/77 test scripts, 89.61% okay. 214/2831 subtests failed, 92.44% okay. No regressions to 2.2.4. 5. Compiles fine on SuSE Linux 64 Bit if expat detection patch (r545129) from apr-util 1.2.x branch is applied: gcc (GCC) 4.1.0 (SUSE Linux) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Linux leibnitz 2.6.16.27-0.9-smp-debug-self #1 SMP Sat Mar 10 15:42:33 CET 2007 x86_64 x86_64 x86_64 GNU/Linux glibc-2.4-31.1 SUSE LINUX 10.1 (X86-64) VERSION = 10.1 OpenSSL 0.9.8a 11 Oct 2005 Failed Test Stat Wstat Total Fail Failed List of Failed --- t/ssl/basicauth.t32 66.67% 2-3 t/ssl/env.t 30 15 50.00% 16-30 t/ssl/extlookup.t22 100.00% 1-2 t/ssl/fakeauth.t 32 66.67% 2-3 t/ssl/proxy.t 172 118 68.60% 1-59 114-172 t/ssl/require.t 52 40.00% 2 5 t/ssl/varlookup.t 72 72 100.00% 1-72 t/ssl/verify.t 31 33.33% 2 7 tests and 18 subtests skipped. Failed 8/77 test scripts, 89.61% okay. 214/2831 subtests failed, 92.44% okay. No regressions to 2.2.4. Regards Rüdiger
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs for review
On Aug 12, 2007, at 9:00 AM, Ruediger Pluem wrote: -1 from me on 2.0.60 as the test framework revealed regressions compared to 2.0.59: What platform? Trying to recreate this... These regression are caused by an apr problem. 2.0.59 is shipped with apr 0.9.12 whereas 2.0.60 is shipped with apr 0.9.14. So I guess we either have to ship 2.0.x with an older release of apr 0.9.x or we have to wait for a new release of apr 0.9.x that fixes this problem. I would prefer not waiting for the next 0.9.x release of APR, so that means shipping 2.0.60 with 0.9.12. 0.9.13 includes the problematic patch :( Comments? Also, would this require a new tag for 2.0.60? It's not an Apache problem, rather with how the 2.0.60 tarball was done, but whenever problems have existed in the tarballs before, we have retagged and rerolled, which I think we would need to do now... That's what I'm going to do...
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs for review
On 08/12/2007 05:45 PM, Jim Jagielski wrote: On Aug 12, 2007, at 9:00 AM, Ruediger Pluem wrote: -1 from me on 2.0.60 as the test framework revealed regressions compared to 2.0.59: What platform? Trying to recreate this... Sorry for omitting: SuSE Linux 32 Bit: gcc (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Linux euler 2.6.18.8-0.5-ruediger-20070715 #1 PREEMPT Sun Jul 15 10:44:38 CEST 2007 i686 athlon i386 GNU/Linux glibc-2.5-25 openSUSE 10.2 (i586) VERSION = 10.2 OpenSSL 0.9.8d 28 Sep 2006 openssl-0.9.8d-23.1 These regression are caused by an apr problem. 2.0.59 is shipped with apr 0.9.12 whereas 2.0.60 is shipped with apr 0.9.14. So I guess we either have to ship 2.0.x with an older release of apr 0.9.x or we have to wait for a new release of apr 0.9.x that fixes this problem. I would prefer not waiting for the next 0.9.x release of APR, so that means shipping 2.0.60 with 0.9.12. 0.9.13 includes the problematic patch :( Comments? Then this looks like the way to go. As you proposed to release 2.2.6 in about 8 weeks, we can also release 2.0.62 then if a new apr 0.9.x release is available then that fixes this issue. Also, would this require a new tag for 2.0.60? It's not an Apache problem, rather with how the 2.0.60 tarball was done, but whenever problems have existed in the tarballs before, we have retagged and rerolled, which I think we would need to do now... That's what I'm going to do... Although this is an apr problem and would mean that the tags for 2.0.60 and 2.0.61 would be the same I would prefer a new tag and a new tarball 2.0.61 to avoid any confusion. Regards Rüdiger
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs
Ruediger Pluem wrote: On 08/12/2007 05:45 PM, Jim Jagielski wrote: Also, would this require a new tag for 2.0.60? It's not an Apache problem, rather with how the 2.0.60 tarball was done, but whenever problems have existed in the tarballs before, we have retagged and rerolled, which I think we would need to do now... That's what I'm going to do... Although this is an apr problem and would mean that the tags for 2.0.60 and 2.0.61 would be the same I would prefer a new tag and a new tarball 2.0.61 to avoid any confusion. Yepper... from day one once the tarball is cut, no matter what's wrong with it, if we need to release another, we bump the tags... there's always the chance that an unofficial tarball will leak and the bump ensures that there's only 1 official release :) -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ If you can dodge a wrench, you can dodge a ball.
Re: [VOTE] Apache 2.2.5, 2.0.60 1.3.38 release candidate tarballs for review
On 11 Aug 2007, at 00:49, Jim Jagielski wrote: [ ]httpd-2.0.60 Not tested (moot in view of Ruediger's -1) [ ]httpd-2.2.5 +1 Linux and MacOS. Fails two Perl tests on Mac (security/CVE-2004-0959 and apache/pr18757), but that appears to be down to my perl installation. -- Nick Kew
Notice of Intent: TR 2.0.61
Just a FYI: I'm planning on doing a TR of 2.0.61 tomorrow (Aug 13); It's a retag of 2.0.60 (plus the version bump, 'natch), and a reroll with the singular exception of bundling APR 0.9.12, instead of 0.9.14. -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ If you can dodge a wrench, you can dodge a ball.
Re: Notice of Intent: TR 2.0.61
Jim Jagielski wrote: Just a FYI: I'm planning on doing a TR of 2.0.61 tomorrow (Aug 13); It's a retag of 2.0.60 (plus the version bump, 'natch), and a reroll with the singular exception of bundling APR 0.9.12, instead of 0.9.14. Just a quick note; I'll definitely find that objectionable. Particularly from 0.9.13 *) Provide folding in autogenerated .manifest files for Win32 builders which provided our Windows users the ability to use the Free Studio 2005 to build their own Apache. I'm always happy to help ensure we have binaries, but not at the expense of encouraging users to roll their own. Also *) Fix detection of pthread cross-process robust mutexes. would also likely impact us negatively on some platforms with respect to ssl cache and accept mutexes, no? So I can hazard a guess that I'd be -1 on such a tarball. Bill