coar97/08/18 06:12:30
Modified:src/modules/example mod_example.c
src/modules/proxy mod_proxy.c
src/modules/standard mod_access.c mod_actions.c mod_alias.c
mod_asis.c mod_auth.c mod_auth_anon.c mod_auth_db.c
mod_auth_dbm.c mod_auth_msql.c mod_autoindex.c
mod_cern_meta.c mod_cgi.c mod_digest.c mod_dir.c
mod_dld.c mod_env.c mod_expires.c mod_headers.c
mod_imap.c mod_include.c mod_info.c mod_log_agent.c
mod_log_config.c mod_log_referer.c mod_mime.c
mod_mime_magic.c mod_negotiation.c mod_rewrite.c
mod_setenvif.c mod_status.c mod_userdir.c
mod_usertrack.c
Log:
Add the post read-request phase placeholder to the structures
in the standard modules.
PR: 1009
Revision ChangesPath
1.14 +52 -1 apachen/src/modules/example/mod_example.c
Index: mod_example.c
===
RCS file: /export/home/cvs/apachen/src/modules/example/mod_example.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_example.c 1997/07/28 18:23:27 1.13
+++ mod_example.c 1997/08/18 13:12:05 1.14
@@ -702,6 +702,33 @@
trace_add (s, NULL, NULL, note);
}
+/*
+ * This function is called when an heavy-weight process (such as a child) is
+ * being run down or destroyed. As with the child-initialisation function,
+ * any information that needs to be recorded must be in static cells, since
+ * there's no configuration record.
+ *
+ * There is no return value.
+ */
+
+/*
+ * All our process-death routine does is add its trace to the log.
+ */
+static void example_child_exit
+(server_rec *s, pool *p) {
+
+char*note;
+char*sname = s-server_hostname;
+
+/*
+ * The arbitrary text we add to our trace entry indicates for which
server
+ * we're being called.
+ */
+sname = (sname != NULL) ? sname : ;
+note = pstrcat (p, example_child_exit(, sname, ), NULL);
+trace_add (s, NULL, NULL, note);
+}
+
/*
* This function gets called to create up a per-directory configuration
* record. This will be called for the default server environment, and for
@@ -888,6 +915,29 @@
}
/*
+ * This routine is called after the request has been read but before any
other
+ * phases have been processed. This allows us to make decisions based upon
+ * the input header fields.
+ *
+ * The return value is OK, DECLINED, or HTTP_mumble. If we return OK, no
+ * further modules are called for this phase.
+ */
+static int example_post_readreq
+(request_rec *r) {
+
+example_config
+*cfg;
+
+cfg = our_dconfig (r);
+/*
+ * We don't actually *do* anything here, except note the fact that we
were
+ * called.
+ */
+trace_add (r-server, r, cfg, example_post_readreq());
+return DECLINED;
+}
+
+/*
* This routine gives our module an opportunity to translate the URI into an
* actual filename. If we don't do anything special, the server's default
* rules (Alias directives and the like) will continue to be followed.
@@ -1139,5 +1189,6 @@
example_logger, /* [9] logger */
example_hparser,/* [2] header parser */
example_child_init, /* process initializer */
-NULL /* process exit/cleanup */
+example_child_exit, /* process exit/cleanup */
+example_post_readreq /* ? */
};
1.22 +2 -2 apachen/src/modules/proxy/mod_proxy.c
Index: mod_proxy.c
===
RCS file: /export/home/cvs/apachen/src/modules/proxy/mod_proxy.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mod_proxy.c 1997/08/01 04:58:01 1.21
+++ mod_proxy.c 1997/08/18 13:12:06 1.22
@@ -756,6 +756,6 @@
NULL,/* logger */
NULL,/* header parser */
NULL, /* child_init */
- NULL /* child_exit */
+ NULL, /* child_exit */
+ NULL /* post read-request */
};
-
1.23 +2 -1 apachen/src/modules/standard/mod_access.c
Index: mod_access.c
===
RCS file: /export/home/cvs/apachen/src/modules/standard/mod_access.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mod_access.c 1997/07/30 18:41:53 1.22
+++ mod_access.c 1997/08/18