summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/http_connection.h15
2 files changed, 17 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 349e56274c..5b21e78d10 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -680,6 +680,7 @@
* 20210531.3 (2.5.1-dev) Add hook child_stopping to get informed that a child
* is being shut down.
* 20210531.4 (2.5.1-dev) Add ap_create_connection
+ * 20210531.5 (2.5.1-dev) Add ap_pre_connection
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@@ -687,7 +688,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20210531
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 4 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 5 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/http_connection.h b/include/http_connection.h
index b49a2577c5..747a84af6e 100644
--- a/include/http_connection.h
+++ b/include/http_connection.h
@@ -136,6 +136,21 @@ AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
AP_DECLARE_HOOK(int,pre_close_connection,(conn_rec *c))
/**
+ * This is a wrapper around ap_run_pre_connection. In case that
+ * ap_run_pre_connection returns an error it marks the connection as
+ * aborted and ensures that the basic connection setup normally done
+ * by the core module is done in case it was not done so far.
+ * @param c The connection on which the request has been received.
+ * Same as for the pre_connection hook.
+ * @param csd The mechanism on which this connection is to be read.
+ * Most times this will be a socket, but it is up to the module
+ * that accepts the request to determine the exact type.
+ * Same as for the pre_connection hook.
+ * @return The result of ap_run_pre_connection
+ */
+AP_DECLARE(int) ap_pre_connection(conn_rec *c, void *csd);
+
+/**
* Create a new server/incoming or client/outgoing/proxy connection
* @param p The pool from which to allocate the connection record
* @param server The server record to create the connection too.