]> granicus.if.org Git - apache/commitdiff
Take my chance and try to sneak in a very nasty change which
authorDirk-Willem van Gulik <dirkx@apache.org>
Tue, 14 Mar 2000 12:18:28 +0000 (12:18 +0000)
committerDirk-Willem van Gulik <dirkx@apache.org>
Tue, 14 Mar 2000 12:18:28 +0000 (12:18 +0000)
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

modules/mappers/mod_negotiation.c

index 2bec9f67303540ebde8be0e75d440bb56e7c7206..8d66fe6687abe063261587fcc3bfe788ca72e25c 100644 (file)
@@ -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}