ASF Bugzilla – Attachment 32413 Details for
Bug 57515
Define/Undefine don't work reasonably outside of global scope
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
block dir context + doc vhost behavior
define-2.diff (text/plain), 4.13 KB, created by
Eric Covener
on 2015-01-30 16:04:26 UTC
(
hide
)
Description:
block dir context + doc vhost behavior
Filename:
MIME Type:
Creator:
Eric Covener
Created:
2015-01-30 16:04:26 UTC
Size:
4.13 KB
patch
obsolete
>Index: CHANGES >=================================================================== >--- CHANGES (revision 1656034) >+++ CHANGES (working copy) >@@ -1,6 +1,11 @@ > -*- coding: utf-8 -*- > Changes with Apache 2.5.0 > >+ *) core: Define and UnDefine are no longer permitted in >+ directory context. Previously they would always be evaulated >+ as the configuration was read without regard for the directory >+ context. [Eric Covener] >+ > *) config: For directives that do not expect any arguments, enforce > that none are specified in the configuration file. > [Joachim Zobel <jzobel heute-morgen.de>, Eric Covener] >Index: server/core.c >=================================================================== >--- server/core.c (revision 1656034) >+++ server/core.c (working copy) >@@ -1332,9 +1332,6 @@ > static const char *set_define(cmd_parms *cmd, void *dummy, > const char *name, const char *value) > { >- const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS); >- if (err) >- return err; > if (ap_strchr_c(name, ':') != NULL) > return "Variable name must not contain ':'"; > >@@ -1358,9 +1355,7 @@ > { > int i; > char **defines; >- const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS); >- if (err) >- return err; >+ > if (ap_strchr_c(name, ':') != NULL) > return "Variable name must not contain ':'"; > >@@ -4181,9 +4176,9 @@ > "The name of the default charset to add to any Content-Type without one or 'Off' to disable"), > AP_INIT_TAKE1("AcceptPathInfo", set_accept_path_info, NULL, OR_FILEINFO, > "Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference"), >-AP_INIT_TAKE12("Define", set_define, NULL, EXEC_ON_READ|ACCESS_CONF|RSRC_CONF, >+AP_INIT_TAKE12("Define", set_define, NULL, EXEC_ON_READ|RSRC_CONF, > "Define a variable, optionally to a value. Same as passing -D to the command line."), >-AP_INIT_TAKE1("UnDefine", unset_define, NULL, EXEC_ON_READ|ACCESS_CONF|RSRC_CONF, >+AP_INIT_TAKE1("UnDefine", unset_define, NULL, EXEC_ON_READ|RSRC_CONF, > "Undefine the existence of a variable. Undo a Define."), > AP_INIT_RAW_ARGS("Error", generate_message, (void*) APLOG_ERR, OR_ALL, > "Generate error message from within configuration."), >Index: docs/manual/mod/core.xml >=================================================================== >--- docs/manual/mod/core.xml (revision 1656034) >+++ docs/manual/mod/core.xml (working copy) >@@ -717,7 +717,7 @@ > <description>Define a variable</description> > <syntax>Define <var>parameter-name</var> [<var>parameter-value</var>]</syntax> > <contextlist><context>server config</context><context>virtual host</context> >-<context>directory</context></contextlist> >+</contextlist> > > <usage> > <p>In its one parameter form, <directive>Define</directive> is equivalent >@@ -746,6 +746,10 @@ > > <p>Variable names may not contain colon ":" characters, to avoid clashes > with <directive module="mod_rewrite">RewriteMap</directive>'s syntax.</p> >+ >+ <p>While this directive is supported in virtual host context, >+ the changes it makes are visible to any further configuration >+ directives, beyond any enclosing virtual host</p> > </usage> > </directivesynopsis> > >@@ -4291,7 +4295,8 @@ > <name>UnDefine</name> > <description>Undefine the existence of a variable</description> > <syntax>UnDefine <var>parameter-name</var></syntax> >-<contextlist><context>server config</context></contextlist> >+<contextlist><context>server config</context> >+<context>virtual host</context></contextlist> > > <usage> > <p>Undoes the effect of a <directive module="core">Define</directive> or >@@ -4299,6 +4304,9 @@ > <p>This directive can be used to toggle the use of <directive module="core" > type="section">IfDefine</directive> sections without needing to alter > <code>-D</code> arguments in any startup scripts.</p> >+ <p>While this directive is supported in virtual host context, >+ the changes it makes are visible to any further configuration >+ directives, beyond any enclosing virtual host</p> > </usage> > </directivesynopsis> >
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 57515
: 32413