in ap_new_connection, but that is bogus, because then other modules can't
put their own filter in. Now, we do this in a new pre-connection hook
function. Later, we will want to add some checking to make sure that this
is really an HTTP request that we are adding the filter for.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86364
13f79535-47bb-0310-9956-
ffa450edef68
CORE_EXPORT(void) ap_process_connection(conn_rec *);
/**
- * The http protocol handler. This makes Apache server http requests
+ * The http pre-protocol handler. This makes sets up Apache to serve http
+ * requests
+ * @param c The connection on which the request is read
+ * @return OK or DECLINED
+ */
+int ap_pre_http_connection(conn_rec *);
+
+/**
+ * The http protocol handler. This makes Apache serve http requests
* @param c The connection on which the request is read
* @return OK or DECLINED
*/
{
ap_hook_post_config(core_post_config,NULL,NULL,AP_HOOK_REALLY_FIRST);
ap_hook_translate_name(ap_core_translate,NULL,NULL,AP_HOOK_REALLY_LAST);
+ ap_hook_pre_connection(ap_pre_http_connection,NULL,NULL,
+ AP_HOOK_REALLY_LAST);
ap_hook_process_connection(ap_process_http_connection,NULL,NULL,
AP_HOOK_REALLY_LAST);
ap_hook_http_method(core_method,NULL,NULL,AP_HOOK_REALLY_LAST);
}
+int ap_pre_http_connection(conn_rec *c)
+{
+ ap_add_input_filter("CORE_IN", NULL, c);
+ return OK;
+}
+
int ap_process_http_connection(conn_rec *c)
{
request_rec *r;
conn->id = id;
- ap_add_input_filter("CORE_IN", NULL, conn);
-
return conn;
}