mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Combine the calls to add the core_filter to one place. Basically, it is
safe to add the core_filter during the post_read_request, and it means that we only have to add the filter once in the code. This should make it easier to add an SSL module in the future. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86307 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -3284,6 +3284,11 @@ static const char *core_method(const request_rec *r)
|
|||||||
static unsigned short core_port(const request_rec *r)
|
static unsigned short core_port(const request_rec *r)
|
||||||
{ return DEFAULT_HTTP_PORT; }
|
{ return DEFAULT_HTTP_PORT; }
|
||||||
|
|
||||||
|
static int core_post_read_req(request_rec *r)
|
||||||
|
{
|
||||||
|
ap_add_filter("CORE", NULL, r);
|
||||||
|
}
|
||||||
|
|
||||||
static void core_register_filter(request_rec *r)
|
static void core_register_filter(request_rec *r)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -3310,6 +3315,7 @@ static void register_hooks(void)
|
|||||||
/* FIXME: I suspect we can eliminate the need for these - Ben */
|
/* FIXME: I suspect we can eliminate the need for these - Ben */
|
||||||
ap_hook_type_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
|
ap_hook_type_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
|
||||||
ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
|
ap_hook_access_checker(do_nothing,NULL,NULL,AP_HOOK_REALLY_LAST);
|
||||||
|
ap_hook_post_read_request(core_post_read_req, NULL, NULL, AP_HOOK_REALLY_FIRST);
|
||||||
|
|
||||||
/* define the CORE filter, then register a hook to insert it at
|
/* define the CORE filter, then register a hook to insert it at
|
||||||
* request-processing time.
|
* request-processing time.
|
||||||
|
@@ -1200,8 +1200,6 @@ request_rec *ap_read_request(conn_rec *conn)
|
|||||||
r->status = HTTP_REQUEST_TIME_OUT; /* Until we get a request */
|
r->status = HTTP_REQUEST_TIME_OUT; /* Until we get a request */
|
||||||
r->the_request = NULL;
|
r->the_request = NULL;
|
||||||
|
|
||||||
ap_add_filter("CORE", NULL, r);
|
|
||||||
|
|
||||||
#ifdef APACHE_XLATE
|
#ifdef APACHE_XLATE
|
||||||
r->rrx = apr_pcalloc(p, sizeof(struct ap_rr_xlate));
|
r->rrx = apr_pcalloc(p, sizeof(struct ap_rr_xlate));
|
||||||
ap_set_content_xlate(r, 0, ap_locale_from_ascii);
|
ap_set_content_xlate(r, 0, ap_locale_from_ascii);
|
||||||
|
@@ -1388,8 +1388,6 @@ static request_rec *internal_internal_redirect(const char *new_uri,
|
|||||||
apr_table_setn(new->subprocess_env, "REDIRECT_STATUS",
|
apr_table_setn(new->subprocess_env, "REDIRECT_STATUS",
|
||||||
apr_psprintf(r->pool, "%d", r->status));
|
apr_psprintf(r->pool, "%d", r->status));
|
||||||
|
|
||||||
ap_add_filter("CORE", NULL, new);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX: hmm. This is because mod_setenvif and mod_unique_id really need
|
* XXX: hmm. This is because mod_setenvif and mod_unique_id really need
|
||||||
* to do their thing on internal redirects as well. Perhaps this is a
|
* to do their thing on internal redirects as well. Perhaps this is a
|
||||||
|
Reference in New Issue
Block a user