From: Dirk-Willem van Gulik Date: Tue, 14 Mar 2000 12:18:28 +0000 (+0000) Subject: Take my chance and try to sneak in a very nasty change which X-Git-Tag: APACHE_2_0_ALPHA_2~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36d7c5c1ed31f7300e2709f170e68cb6cd588d56;p=apache 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 --- diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 2bec9f6730..8d66fe6687 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -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}