ben 99/07/17 03:36:05
Modified: mpm/src/include http_config.h http_protocol.h
mpm/src/main http_config.c http_core.c http_protocol.c
http_request.c
mpm/src/modules/mpm/prefork prefork.c
mpm/src/modules/standard Makefile.tmpl mod_access.c
mod_actions.c mod_alias.c mod_asis.c mod_auth.c
mod_autoindex.c mod_dir.c mod_env.c mod_imap.c
mod_log_config.c mod_mime.c mod_negotiation.c
mod_setenvif.c mod_userdir.c
Log:
Another hook.
Revision Changes Path
1.8 +0 -4 apache-2.0/mpm/src/include/http_config.h
Index: http_config.h
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_config.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- http_config.h 1999/07/11 19:00:47 1.7
+++ http_config.h 1999/07/17 10:35:33 1.8
@@ -237,14 +237,12 @@
* supposed to handle this was configured wrong).
* type_checker --- Determine MIME type of the requested entity;
* sets content_type, _encoding and _language fields.
- * logger --- log a transaction.
*/
int (*auth_checker) (request_rec *);
int (*access_checker) (request_rec *);
int (*type_checker) (request_rec *);
int (*fixer_upper) (request_rec *);
- int (*logger) (request_rec *);
void (*register_hooks) (void);
} module;
@@ -373,8 +371,6 @@
int ap_find_types(request_rec *); /* identify MIME type */
int ap_run_fixups(request_rec *); /* poke around for other metainfo,
etc.... */
int ap_invoke_handler(request_rec *);
-int ap_log_transaction(request_rec *r);
-int ap_run_post_read_request(request_rec *);
/* for mod_perl */
1.3 +1 -0 apache-2.0/mpm/src/include/http_protocol.h
Index: http_protocol.h
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/include/http_protocol.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- http_protocol.h 1999/07/06 21:32:08 1.2
+++ http_protocol.h 1999/07/17 10:35:34 1.3
@@ -224,6 +224,7 @@
* and not run during any subrequests.
*/
DECLARE_HOOK(int,post_read_request,(request_rec *))
+DECLARE_HOOK(int,log_transaction,(request_rec *))
#ifdef __cplusplus
}
1.11 +0 -8 apache-2.0/mpm/src/main/http_config.c
Index: http_config.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_config.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- http_config.c 1999/07/11 19:00:48 1.10
+++ http_config.c 1999/07/17 10:35:39 1.11
@@ -240,7 +240,6 @@
m(auth_checker),
m(type_checker),
m(fixer_upper),
- m(logger),
{ -1, "?" },
#undef m
};
@@ -279,7 +278,6 @@
XtOffsetOf(module, access_checker),
XtOffsetOf(module, type_checker),
XtOffsetOf(module, fixer_upper),
- XtOffsetOf(module, logger)
};
#define NMETHODS (sizeof (method_offsets)/sizeof (method_offsets[0]))
@@ -288,7 +286,6 @@
int access_checker;
int type_checker;
int fixer_upper;
- int logger;
} offsets_into_method_ptrs;
/*
@@ -379,11 +376,6 @@
int ap_run_fixups(request_rec *r)
{
return run_method(r, offsets_into_method_ptrs.fixer_upper, 1);
-}
-
-int ap_log_transaction(request_rec *r)
-{
- return run_method(r, offsets_into_method_ptrs.logger, 1);
}
IMPLEMENT_HOOK(int,header_parser,(request_rec *r),(r),RUN_ALL,OK,DECLINED)
1.7 +0 -1 apache-2.0/mpm/src/main/http_core.c
Index: http_core.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_core.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- http_core.c 1999/07/11 19:00:48 1.6
+++ http_core.c 1999/07/17 10:35:40 1.7
@@ -2651,6 +2651,5 @@
do_nothing, /* check access */
do_nothing, /* type_checker */
NULL, /* pre-run fixups */
- NULL, /* logger */
register_hooks /* register hooks */
};
1.12 +8 -6 apache-2.0/mpm/src/main/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- http_protocol.c 1999/07/11 16:42:24 1.11
+++ http_protocol.c 1999/07/17 10:35:41 1.12
@@ -77,6 +77,7 @@
HOOK_STRUCT(
HOOK_LINK(post_read_request)
+ HOOK_LINK(log_transaction)
);
#define SET_BYTES_SENT(r) \
@@ -976,7 +977,7 @@
"request failed: URI too long");
ap_send_error_response(r, 0);
ap_rflush(r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return r;
}
return NULL;
@@ -992,7 +993,7 @@
"request failed: error reading the headers");
ap_send_error_response(r, 0);
ap_rflush(r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return r;
}
}
@@ -1010,7 +1011,7 @@
r->status = HTTP_BAD_REQUEST;
ap_send_error_response(r, 0);
ap_rflush(r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return r;
}
}
@@ -1043,7 +1044,7 @@
"(see RFC2068 section 9, and 14.23): %s", r->uri);
ap_send_error_response(r, 0);
ap_rflush(r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return r;
}
if (((expect = ap_table_get(r->headers_in, "Expect")) != NULL) &&
@@ -1065,14 +1066,14 @@
ap_send_error_response(r, 0);
ap_rflush(r);
(void) ap_discard_request_body(r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return r;
}
}
if ((access_status = ap_run_post_read_request(r))) {
ap_die(access_status, r);
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
return NULL;
}
@@ -2689,3 +2690,4 @@
}
IMPLEMENT_HOOK(int,post_read_request,(request_rec
*r),(r),RUN_ALL,OK,DECLINED)
+IMPLEMENT_HOOK(int,log_transaction,(request_rec *r),(r),RUN_ALL,OK,DECLINED)
1.11 +1 -1 apache-2.0/mpm/src/main/http_request.c
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- http_request.c 1999/07/11 19:00:49 1.10
+++ http_request.c 1999/07/17 10:35:42 1.11
@@ -1254,7 +1254,7 @@
*/
/* TODO: re-implement ap_bhalfduplex... not sure how yet */
/* //ap_bhalfduplex(r->connection->client); */
- ap_log_transaction(r);
+ ap_run_log_transaction(r);
}
static table *rename_original_env(pool *p, table *t)
1.13 +0 -1 apache-2.0/mpm/src/modules/mpm/prefork/prefork.c
Index: prefork.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/mpm/prefork/prefork.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- prefork.c 1999/07/16 05:30:31 1.12
+++ prefork.c 1999/07/17 10:35:48 1.13
@@ -3091,6 +3091,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* pre-run fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.8 +2 -1 apache-2.0/mpm/src/modules/standard/Makefile.tmpl
Index: Makefile.tmpl
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/Makefile.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Makefile.tmpl 1999/07/16 18:24:26 1.7
+++ Makefile.tmpl 1999/07/17 10:35:50 1.8
@@ -189,7 +189,8 @@
$(INCDIR)/alloc.h $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
$(INCDIR)/ap.h $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
$(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
- $(INCDIR)/http_core.h $(INCDIR)/http_log.h
+ $(INCDIR)/http_core.h $(INCDIR)/http_log.h \
+ $(INCDIR)/http_protocol.h
mod_log_referer.o: mod_log_referer.c $(INCDIR)/httpd.h \
$(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_access.c
Index: mod_access.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_access.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_access.c 1999/07/11 19:00:51 1.5
+++ mod_access.c 1999/07/17 10:35:51 1.6
@@ -404,6 +404,5 @@
check_dir_access, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.5 +0 -1 apache-2.0/mpm/src/modules/standard/mod_actions.c
Index: mod_actions.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_actions.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_actions.c 1999/07/16 08:28:41 1.4
+++ mod_actions.c 1999/07/17 10:35:51 1.5
@@ -226,6 +226,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_alias.c
Index: mod_alias.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_alias.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_alias.c 1999/07/11 19:00:51 1.6
+++ mod_alias.c 1999/07/17 10:35:52 1.7
@@ -420,6 +420,5 @@
NULL, /* check access */
NULL, /* type_checker */
fixup_redir, /* fixups */
- NULL, /* logger */
register_hooks /* register hooks */
};
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_asis.c
Index: mod_asis.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_asis.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_asis.c 1999/07/11 19:00:51 1.5
+++ mod_asis.c 1999/07/17 10:35:52 1.6
@@ -141,6 +141,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* pre-run fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_auth.c
Index: mod_auth.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_auth.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_auth.c 1999/07/11 19:00:51 1.5
+++ mod_auth.c 1999/07/17 10:35:53 1.6
@@ -333,6 +333,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
register_hooks /* register hooks */
};
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_autoindex.c
Index: mod_autoindex.c
===================================================================
RCS file:
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_autoindex.c 1999/07/11 19:00:51 1.5
+++ mod_autoindex.c 1999/07/17 10:35:53 1.6
@@ -1665,6 +1665,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.5 +0 -1 apache-2.0/mpm/src/modules/standard/mod_dir.c
Index: mod_dir.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_dir.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_dir.c 1999/07/11 19:00:52 1.4
+++ mod_dir.c 1999/07/17 10:35:54 1.5
@@ -239,6 +239,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* pre-run fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_env.c
Index: mod_env.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_env.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_env.c 1999/07/11 19:00:52 1.6
+++ mod_env.c 1999/07/17 10:35:54 1.7
@@ -264,6 +264,5 @@
NULL, /* check access */
NULL, /* type_checker */
fixup_env_module, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_imap.c
Index: mod_imap.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_imap.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_imap.c 1999/07/11 19:00:52 1.5
+++ mod_imap.c 1999/07/17 10:35:55 1.6
@@ -912,6 +912,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.6 +7 -2 apache-2.0/mpm/src/modules/standard/mod_log_config.c
Index: mod_log_config.c
===================================================================
RCS file:
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_log_config.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_log_config.c 1999/07/11 19:00:52 1.5
+++ mod_log_config.c 1999/07/17 10:35:55 1.6
@@ -172,6 +172,7 @@
#include "http_config.h"
#include "http_core.h" /* For REMOTE_NAME */
#include "http_log.h"
+#include "http_protocol.h"
#include <limits.h>
module MODULE_VAR_EXPORT config_log_module;
@@ -1104,6 +1105,11 @@
}
#endif
+static void register_hooks()
+ {
+ ap_hook_log_transaction(multi_log_transaction,NULL,NULL,HOOK_MIDDLE);
+ }
+
module MODULE_VAR_EXPORT config_log_module =
{
STANDARD20_MODULE_STUFF,
@@ -1122,6 +1128,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- multi_log_transaction, /* logger */
- NULL /* register hooks */
+ register_hooks /* register hooks */
};
1.5 +0 -1 apache-2.0/mpm/src/modules/standard/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_mime.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mod_mime.c 1999/07/11 19:00:52 1.4
+++ mod_mime.c 1999/07/17 10:35:56 1.5
@@ -395,6 +395,5 @@
NULL, /* check access */
find_ct, /* type_checker */
NULL, /* pre-run fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.6 +0 -1 apache-2.0/mpm/src/modules/standard/mod_negotiation.c
Index: mod_negotiation.c
===================================================================
RCS file:
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_negotiation.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mod_negotiation.c 1999/07/11 19:00:53 1.5
+++ mod_negotiation.c 1999/07/17 10:35:56 1.6
@@ -2742,6 +2742,5 @@
NULL, /* check access */
handle_multi, /* type_checker */
fix_encoding, /* fixups */
- NULL, /* logger */
NULL /* register hooks */
};
1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_setenvif.c
Index: mod_setenvif.c
===================================================================
RCS file:
/export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_setenvif.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_setenvif.c 1999/07/11 19:00:53 1.6
+++ mod_setenvif.c 1999/07/17 10:35:57 1.7
@@ -423,7 +423,6 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
register_hooks /* register hooks */
};
1.7 +0 -1 apache-2.0/mpm/src/modules/standard/mod_userdir.c
Index: mod_userdir.c
===================================================================
RCS file: /export/home/cvs/apache-2.0/mpm/src/modules/standard/mod_userdir.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mod_userdir.c 1999/07/11 19:00:53 1.6
+++ mod_userdir.c 1999/07/17 10:35:57 1.7
@@ -351,6 +351,5 @@
NULL, /* check access */
NULL, /* type_checker */
NULL, /* fixups */
- NULL, /* logger */
register_hooks /* register hooks */
};