From a8d0009e5c7b782b4a00fd39ca97acdb13becd1a Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Sun, 6 Apr 2008 00:42:21 +0000 Subject: [PATCH] If you study all of the directive implementations, you'll note that we get less than 20% of the NOT_IN_LIMIT rules correct. works in about 4 directive contexts and yet, we ignore this fact for 100's of directives. Simply eliminate this nonsense in anticipation of a 100% solution. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645189 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_suexec.c | 2 +- modules/http/http_core.c | 6 +++--- modules/metadata/mod_ident.c | 18 +++++------------- modules/proxy/mod_proxy.c | 3 +-- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/modules/generators/mod_suexec.c b/modules/generators/mod_suexec.c index 9c5e239ca0..e0c8e1932b 100644 --- a/modules/generators/mod_suexec.c +++ b/modules/generators/mod_suexec.c @@ -60,7 +60,7 @@ static const char *set_suexec_ugid(cmd_parms *cmd, void *mconfig, const char *uid, const char *gid) { suexec_config_t *cfg = (suexec_config_t *) mconfig; - const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); + const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL) { return err; diff --git a/modules/http/http_core.c b/modules/http/http_core.c index c2607809d2..b4cafaf435 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -49,7 +49,7 @@ static int ap_process_http_connection(conn_rec *c); static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy, const char *arg) { - const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); + const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL) { return err; } @@ -61,7 +61,7 @@ static const char *set_keep_alive_timeout(cmd_parms *cmd, void *dummy, static const char *set_keep_alive(cmd_parms *cmd, void *dummy, const char *arg) { - const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); + const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL) { return err; } @@ -81,7 +81,7 @@ static const char *set_keep_alive(cmd_parms *cmd, void *dummy, static const char *set_keep_alive_max(cmd_parms *cmd, void *dummy, const char *arg) { - const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); + const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err != NULL) { return err; } diff --git a/modules/metadata/mod_ident.c b/modules/metadata/mod_ident.c index 415778608c..9b9fcfca65 100644 --- a/modules/metadata/mod_ident.c +++ b/modules/metadata/mod_ident.c @@ -243,26 +243,18 @@ static apr_status_t rfc1413_query(apr_socket_t *sock, conn_rec *conn, static const char *set_idcheck(cmd_parms *cmd, void *d_, int arg) { ident_config_rec *d = d_; - const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT); - if (!err) { - d->do_rfc1413 = arg ? 1 : 0; - } - - return err; + d->do_rfc1413 = arg ? 1 : 0; + return NULL; } static const char *set_timeout(cmd_parms *cmd, void *d_, const char *arg) { ident_config_rec *d = d_; - const char *err = ap_check_cmd_context(cmd, NOT_IN_LIMIT); - - if (!err) { - d->timeout = apr_time_from_sec(atoi(arg)); - d->timeout_unset = 0; - } - return err; + d->timeout = apr_time_from_sec(atoi(arg)); + d->timeout_unset = 0; + return NULL; } static void *create_ident_dir_config(apr_pool_t *p, char *d) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 45e07681f5..9d06abffe1 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -1908,8 +1908,7 @@ static const char *proxysection(cmd_parms *cmd, void *mconfig, const char *arg) proxy_balancer *balancer = NULL; proxy_worker *worker = NULL; - const char *err = ap_check_cmd_context(cmd, - NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT); + const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); proxy_server_conf *sconf = (proxy_server_conf *) ap_get_module_config(cmd->server->module_config, &proxy_module); -- 2.40.0