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

(-)CHANGES (+5 lines)
Lines 1-6 Link Here
1
                                                         -*- coding: utf-8 -*-
1
                                                         -*- coding: utf-8 -*-
2
Changes with Apache 2.5.0
2
Changes with Apache 2.5.0
3
3
4
  *) core: Define and UnDefine are no longer permitted in
5
     directory context. Previously they would always be evaulated
6
     as the configuration was read without regard for the directory
7
     context. [Eric Covener]
8
4
  *) config: For directives that do not expect any arguments, enforce
9
  *) config: For directives that do not expect any arguments, enforce
5
     that none are specified in the configuration file. 
10
     that none are specified in the configuration file. 
6
     [Joachim Zobel <jzobel heute-morgen.de>, Eric Covener]
11
     [Joachim Zobel <jzobel heute-morgen.de>, Eric Covener]
(-)server/core.c (-8 / +3 lines)
Lines 1332-1340 Link Here
1332
static const char *set_define(cmd_parms *cmd, void *dummy,
1332
static const char *set_define(cmd_parms *cmd, void *dummy,
1333
                              const char *name, const char *value)
1333
                              const char *name, const char *value)
1334
{
1334
{
1335
    const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
1336
    if (err)
1337
        return err;
1338
    if (ap_strchr_c(name, ':') != NULL)
1335
    if (ap_strchr_c(name, ':') != NULL)
1339
        return "Variable name must not contain ':'";
1336
        return "Variable name must not contain ':'";
1340
1337
Lines 1358-1366 Link Here
1358
{
1355
{
1359
    int i;
1356
    int i;
1360
    char **defines;
1357
    char **defines;
1361
    const char *err = ap_check_cmd_context(cmd, NOT_IN_HTACCESS);
1358
1362
    if (err)
1363
        return err;
1364
    if (ap_strchr_c(name, ':') != NULL)
1359
    if (ap_strchr_c(name, ':') != NULL)
1365
        return "Variable name must not contain ':'";
1360
        return "Variable name must not contain ':'";
1366
1361
Lines 4181-4189 Link Here
4181
  "The name of the default charset to add to any Content-Type without one or 'Off' to disable"),
4176
  "The name of the default charset to add to any Content-Type without one or 'Off' to disable"),
4182
AP_INIT_TAKE1("AcceptPathInfo", set_accept_path_info, NULL, OR_FILEINFO,
4177
AP_INIT_TAKE1("AcceptPathInfo", set_accept_path_info, NULL, OR_FILEINFO,
4183
  "Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference"),
4178
  "Set to on or off for PATH_INFO to be accepted by handlers, or default for the per-handler preference"),
4184
AP_INIT_TAKE12("Define", set_define, NULL, EXEC_ON_READ|ACCESS_CONF|RSRC_CONF,
4179
AP_INIT_TAKE12("Define", set_define, NULL, EXEC_ON_READ|RSRC_CONF,
4185
              "Define a variable, optionally to a value.  Same as passing -D to the command line."),
4180
              "Define a variable, optionally to a value.  Same as passing -D to the command line."),
4186
AP_INIT_TAKE1("UnDefine", unset_define, NULL, EXEC_ON_READ|ACCESS_CONF|RSRC_CONF,
4181
AP_INIT_TAKE1("UnDefine", unset_define, NULL, EXEC_ON_READ|RSRC_CONF,
4187
              "Undefine the existence of a variable. Undo a Define."),
4182
              "Undefine the existence of a variable. Undo a Define."),
4188
AP_INIT_RAW_ARGS("Error", generate_message, (void*) APLOG_ERR, OR_ALL,
4183
AP_INIT_RAW_ARGS("Error", generate_message, (void*) APLOG_ERR, OR_ALL,
4189
                 "Generate error message from within configuration."),
4184
                 "Generate error message from within configuration."),
(-)docs/manual/mod/core.xml (-2 / +10 lines)
Lines 717-723 Link Here
717
<description>Define a variable</description>
717
<description>Define a variable</description>
718
<syntax>Define <var>parameter-name</var> [<var>parameter-value</var>]</syntax>
718
<syntax>Define <var>parameter-name</var> [<var>parameter-value</var>]</syntax>
719
<contextlist><context>server config</context><context>virtual host</context>
719
<contextlist><context>server config</context><context>virtual host</context>
720
<context>directory</context></contextlist>
720
</contextlist>
721
721
722
<usage>
722
<usage>
723
    <p>In its one parameter form, <directive>Define</directive> is equivalent
723
    <p>In its one parameter form, <directive>Define</directive> is equivalent
Lines 746-751 Link Here
746
746
747
    <p>Variable names may not contain colon ":" characters, to avoid clashes
747
    <p>Variable names may not contain colon ":" characters, to avoid clashes
748
    with <directive module="mod_rewrite">RewriteMap</directive>'s syntax.</p>
748
    with <directive module="mod_rewrite">RewriteMap</directive>'s syntax.</p>
749
750
    <p>While this directive is supported in virtual host context,
751
       the changes it makes are visible to any further configuration
752
       directives, beyond any enclosing virtual host</p>
749
</usage>
753
</usage>
750
</directivesynopsis>
754
</directivesynopsis>
751
755
Lines 4291-4297 Link Here
4291
<name>UnDefine</name>
4295
<name>UnDefine</name>
4292
<description>Undefine the existence of a variable</description>
4296
<description>Undefine the existence of a variable</description>
4293
<syntax>UnDefine <var>parameter-name</var></syntax>
4297
<syntax>UnDefine <var>parameter-name</var></syntax>
4294
<contextlist><context>server config</context></contextlist>
4298
<contextlist><context>server config</context>
4299
<context>virtual host</context></contextlist>
4295
4300
4296
<usage>
4301
<usage>
4297
    <p>Undoes the effect of a <directive module="core">Define</directive> or
4302
    <p>Undoes the effect of a <directive module="core">Define</directive> or
Lines 4299-4304 Link Here
4299
    <p>This directive can be used to toggle the use of <directive module="core"
4304
    <p>This directive can be used to toggle the use of <directive module="core"
4300
    type="section">IfDefine</directive> sections without needing to alter
4305
    type="section">IfDefine</directive> sections without needing to alter
4301
    <code>-D</code> arguments in any startup scripts.</p>
4306
    <code>-D</code> arguments in any startup scripts.</p>
4307
    <p>While this directive is supported in virtual host context,
4308
       the changes it makes are visible to any further configuration
4309
       directives, beyond any enclosing virtual host</p>
4302
</usage>
4310
</usage>
4303
</directivesynopsis>
4311
</directivesynopsis>
4304
4312

Return to bug 57515