View | Details | Raw Unified | Return to bug 52439
Collapse All | Expand All

(-)httpd/server/core.c (-2 / +21 lines)
Lines 1975-1983 Link Here
1975
        }
1975
        }
1976
1976
1977
        if ( (cmd->override_opts & opt) != opt ) {
1977
        if ( (cmd->override_opts & opt) != opt ) {
1978
            return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL);
1978
            if (cmd->override & NONFATAL_OVERRIDE) {
1979
                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "Option %s not allowed in line %d of %s.",
1980
                    w, cmd->directive->line_num, cmd->directive->filename);
1981
1982
                /* special case for Options All, we might want to enable every possible (and allowed) parameter */
1983
                if (opt != OPT_ALL) {
1984
                    first = 0;
1985
                    continue;
1986
                } else {
1987
                    /* OPT_ALL doesnt include OPT_SYM_OWNER so its important to take this into account too */
1988
                    if (cmd->override & OPT_SYM_OWNER) {
1989
                        opt = OPT_ALL & cmd->override;
1990
                    } else {
1991
                        opt = (OPT_ALL | OPT_SYM_OWNER) & cmd->override;
1992
                    }
1993
                }
1994
            } else {
1995
                return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL);
1996
            }
1979
        }
1997
        }
1980
        else if (action == '-') {
1998
1999
        if (action == '-') {
1981
            /* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */
2000
            /* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */
1982
            d->opts_remove |= opt;
2001
            d->opts_remove |= opt;
1983
            d->opts_add &= ~opt;
2002
            d->opts_add &= ~opt;

Return to bug 52439