You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by di...@locus.apache.org on 2000/03/14 13:18:28 UTC

cvs commit: apache-2.0/src/modules/standard mod_negotiation.c

dirkx       00/03/14 04:18:28

  Modified:    src      CHANGES
               src/modules/standard mod_negotiation.c
  Log:
  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.
  
  Revision  Changes    Path
  1.24      +6 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -u -r1.23 -r1.24
  --- CHANGES	2000/03/13 18:45:35	1.23
  +++ CHANGES	2000/03/14 12:18:27	1.24
  @@ -1,5 +1,11 @@
   Changes with Apache 2.0a2-dev
   
  +  *) Changed 'CacheNegotiatedDocs' from its present/not-present
  +     syntax into a 'on' or 'off' syntax. As it currently is the
  +     only non nesting token which uses NO_ARGS and thus is an
  +     absolute pain for any config interface automation. This
  +     breaks backward compatibility. [Dirk-Willem van Gulik]
  +
     *) Add ability to add external modules to the build process.  This is
        done with --with-module=/path/to/module.  Modules can only be added
        as static modules at this point.
  
  
  
  1.20      +5 -4      apache-2.0/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -u -r1.19 -r1.20
  --- mod_negotiation.c	2000/03/10 00:07:12	1.19
  +++ mod_negotiation.c	2000/03/14 12:18:28	1.20
  @@ -117,11 +117,12 @@
   }
   
   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 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}