Commit 26460d3d authored by Dirk-Willem van Gulik's avatar Dirk-Willem van Gulik
Browse files

Take my chance and try to sneak in a very nasty change which

will break some backward compatibility but get rid of half a
dozen nasty if-then special cases in any config file parser
or gui. I am _NOT_ going to be offended if anyone rolls this
patch back; or hack's it with a RAW_ARG as to also take the
old config as well.

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84763 13f79535-47bb-0310-9956-ffa450edef68
parent 00535a26
Loading
Loading
Loading
Loading
+5 −4
Changes for modules/mappers/mod_negotiation.c: 5 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -117,11 +117,12 @@ static const char *set_language_priority(cmd_parms *cmd, void *n, char *lang)
}

static const char *cache_negotiated_docs(cmd_parms *cmd, void *dummy,
                                         char *dummy2)
                                         int arg)
{
    void *server_conf = cmd->server->module_config;

    ap_set_module_config(server_conf, &negotiation_module, "Cache");
    ap_set_module_config(server_conf, &negotiation_module, 
	(arg ? "Cache" : NULL));
    return NULL;
}

@@ -132,8 +133,8 @@ static int do_cache_negotiated_docs(server_rec *s)

static const command_rec negotiation_cmds[] =
{
    {"CacheNegotiatedDocs", cache_negotiated_docs, NULL, RSRC_CONF, NO_ARGS,
     "no arguments (either present or absent)"},
    {"CacheNegotiatedDocs", cache_negotiated_docs, NULL, RSRC_CONF, FLAG,
     "Either 'on' or 'off' (default)"},
    {"LanguagePriority", set_language_priority, NULL, OR_FILEINFO, ITERATE,
     "space-delimited list of MIME language abbreviations"},
    {NULL}