You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by do...@apache.org on 2001/01/22 02:11:02 UTC
cvs commit: httpd-2.0/support apxs.in
dougm 01/01/21 17:11:02
Modified: support apxs.in
Log:
adjust to ap_hook_handler changes
Revision Changes Path
1.15 +11 -10 httpd-2.0/support/apxs.in
Index: apxs.in
===================================================================
RCS file: /home/cvs/httpd-2.0/support/apxs.in,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- apxs.in 2000/12/19 23:33:54 1.14
+++ apxs.in 2001/01/22 01:11:01 1.15
@@ -565,7 +565,7 @@
** [Autogenerated via ``apxs -n %NAME% -g'']
**
** To play with this sample module first compile it into a
-** DSO file and install it into Apache's libexec directory
+** DSO file and install it into Apache's modules directory
** by running:
**
** $ apxs -c -i mod_%NAME%.c
@@ -574,7 +574,7 @@
** for the URL /%NAME% in as follows:
**
** # %TARGET%.conf
-** LoadModule %NAME%_module libexec/mod_%NAME%.so
+** LoadModule %NAME%_module modules/mod_%NAME%.so
** <Location /%NAME%>
** SetHandler %NAME%
** </Location>
@@ -583,7 +583,7 @@
**
** $ apachectl restart
**
-** you immediately can request the URL /%NAME and watch for the
+** you immediately can request the URL /%NAME% and watch for the
** output of this module. This can be achieved for instance via:
**
** $ lynx -mime_header http://localhost/%NAME%
@@ -607,6 +607,9 @@
/* The sample content handler */
static int %NAME%_handler(request_rec *r)
{
+ if (strcmp(r->handler, "%NAME%")) {
+ return DECLINED;
+ }
r->content_type = "text/html";
ap_send_http_header(r);
if (!r->header_only)
@@ -614,11 +617,10 @@
return OK;
}
-/* Dispatch list of content handlers */
-static const handler_rec %NAME%_handlers[] = {
- { "%NAME%", %NAME%_handler },
- { NULL, NULL }
-};
+static void %NAME%_register_hooks(apr_pool_t *p)
+{
+ ap_hook_handler(%NAME%_handler, NULL, NULL, APR_HOOK_LAST);
+}
/* Dispatch list for API hooks */
module AP_MODULE_DECLARE_DATA %NAME%_module = {
@@ -628,7 +630,6 @@
NULL, /* create per-server config structures */
NULL, /* merge per-server config structures */
NULL, /* table of config file commands */
- %NAME%_handlers, /* [#8] MIME-typed-dispatched handlers */
- NULL /* register hooks */
+ %NAME%_register_hooks /* register hooks */
};
Re: cvs commit: httpd-2.0/support apxs.in
Posted by Doug MacEachern <do...@covalent.net>.
On Sun, 21 Jan 2001, Greg Stein wrote:
> Meta-question: *why* does APXS spit out a sample module? Isn't that what we
> have mod_example for?
i assume its for the quick 'hey-it-works' factor, the embedded docs
explain howto configure and ping with lynx. mod_example is huge, the apxs
generated module is a nice tiny bare-bones starting point.
> IMO, we should toss that "feature" from APXS.
i think its useful, and just as easy to rip out if you don't need
it. wouldn't complain much if it went away though, i just wanted apxs to
work again.
> > +static void %NAME%_register_hooks(apr_pool_t *p)
> > +{
> > + ap_hook_handler(%NAME%_handler, NULL, NULL, APR_HOOK_LAST);
> > +}
>
> Should be APR_HOOK_MIDDLE.
fixed.
Re: cvs commit: httpd-2.0/support apxs.in
Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jan 22, 2001 at 01:11:02AM -0000, dougm@apache.org wrote:
> dougm 01/01/21 17:11:02
>
> Modified: support apxs.in
> Log:
> adjust to ap_hook_handler changes
Meta-question: *why* does APXS spit out a sample module? Isn't that what we
have mod_example for?
IMO, we should toss that "feature" from APXS.
> +static void %NAME%_register_hooks(apr_pool_t *p)
> +{
> + ap_hook_handler(%NAME%_handler, NULL, NULL, APR_HOOK_LAST);
> +}
Should be APR_HOOK_MIDDLE.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/