ASF Bugzilla – Attachment 34099 Details for
Bug 52439
It should be possible to treat errors in .htaccess as nonfatal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Honour nonfatal unknown for options all
edge-case.patch (text/plain), 2.06 KB, created by
Alexis Maiquez
on 2016-08-03 11:15:42 UTC
(
hide
)
Description:
Honour nonfatal unknown for options all
Filename:
MIME Type:
Creator:
Alexis Maiquez
Created:
2016-08-03 11:15:42 UTC
Size:
2.06 KB
patch
obsolete
>--- httpd/server/core.c 2016-06-14 01:08:08.000000000 +0200 >+++ httpd/server/core.c 2016-08-03 13:00:56.472620572 +0200 >@@ -1971,13 +1971,38 @@ > all_none = 1; > } > else { >- return apr_pstrcat(cmd->pool, "Illegal option ", w, NULL); >+ if (cmd->override & NONFATAL_UNKNOWN) { >+ opt = 0; >+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "Unknown Option %s in line %d of %s.", >+ w, cmd->directive->line_num, cmd->directive->filename); >+ } else { >+ return apr_pstrcat(cmd->pool, "Illegal option ", w, NULL); >+ } > } > > if ( (cmd->override_opts & opt) != opt ) { >- return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL); >+ if (cmd->override & NONFATAL_OVERRIDE) { >+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, cmd->server, "Option %s not allowed in line %d of %s.", >+ w, cmd->directive->line_num, cmd->directive->filename); >+ >+ /* special case for Options All, we might want to enable every possible (and allowed) parameter */ >+ if (opt != OPT_ALL) { >+ first = 0; >+ continue; >+ } else { >+ /* >+ * OPT_ALL doesnt include OPT_SYM_OWNER but its important to enable that one too >+ * also take in mind that Options All does not have + or - so it'll be added to the already enabled options >+ * this means it'll enable everything that is allowed to be overriden >+ */ >+ opt = (OPT_ALL | OPT_SYM_OWNER) & cmd->override_opts; >+ } >+ } else { >+ return apr_pstrcat(cmd->pool, "Option ", w, " not allowed here", NULL); >+ } > } >- else if (action == '-') { >+ >+ if (action == '-') { > /* we ensure the invariant (d->opts_add & d->opts_remove) == 0 */ > d->opts_remove |= opt; > d->opts_add &= ~opt;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52439
:
30775
|
34093
| 34099