core: AllowOverride, AllowOverrideList
mod_authn_dbd: AuthDBDUserPWQuery, AuthDBDUserRealmQuery
mod_authz_dbd: AuthzDBDQuery, AuthzDBDRedirectQuery
mod_proxy: BalancerMember, ProxySet
Adjust for use in .htaccess:
mod_actions: Script
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1153687 13f79535-47bb-0310-9956-
ffa450edef68
{
static unsigned int label_num = 0;
char *label;
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
+ if (err)
+ return err;
if (authn_dbd_prepare_fn == NULL) {
authn_dbd_prepare_fn = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare);
{
static unsigned int label_num = 0;
char *label;
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
+ if (err)
+ return err;
if (dbd_prepare == NULL) {
dbd_prepare = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_prepare);
const char *method, const char *script)
{
action_dir_config *m = (action_dir_config *)m_v;
-
- /* ap_method_register recognizes already registered methods,
- * so don't bother to check its previous existence explicitely.
- */
- int methnum = ap_method_register(cmd->pool, method);
+ int methnum;
+ if (cmd->pool == cmd->temp_pool) {
+ /* In .htaccess, we can't globally register new methods. */
+ methnum = ap_method_number_of(method);
+ }
+ else {
+ /* ap_method_register recognizes already registered methods,
+ * so don't bother to check its previous existence explicitely.
+ */
+ methnum = ap_method_register(cmd->pool, method);
+ }
if (methnum == M_TRACE) {
return "TRACE not allowed for Script";
const apr_table_entry_t *elts;
int reuse = 0;
int i;
- const char *err;
+ /* XXX: Should this be NOT_IN_DIRECTORY|NOT_IN_FILES? */
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
+ if (err)
+ return err;
if (cmd->path)
path = apr_pstrdup(cmd->pool, cmd->path);
char *word, *val;
proxy_balancer *balancer = NULL;
proxy_worker *worker = NULL;
- const char *err;
int in_proxy_section = 0;
+ /* XXX: Should this be NOT_IN_DIRECTORY|NOT_IN_FILES? */
+ const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
+ if (err)
+ return err;
if (cmd->directive->parent &&
strncasecmp(cmd->directive->parent->directive,
core_dir_config *d = d_;
char *w;
char *k, *v;
+ const char *err;
/* Throw a warning if we're in <Location> or <Files> */
if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
"Useless use of AllowOverride in line %d of %s.",
cmd->directive->line_num, cmd->directive->filename);
}
+ if ((err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS)) != NULL)
+ return err;
d->override = OR_NONE;
while (l[0]) {
{
core_dir_config *d = d_;
int i;
+ const char *err;
/* Throw a warning if we're in <Location> or <Files> */
if (ap_check_cmd_context(cmd, NOT_IN_LOCATION | NOT_IN_FILES)) {
"Useless use of AllowOverrideList in line %d of %s.",
cmd->directive->line_num, cmd->directive->filename);
}
+ if ((err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS)) != NULL)
+ return err;
d->override_list = apr_table_make(cmd->pool, 1);