]> granicus.if.org Git - apache/commitdiff
PR:
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 29 May 2000 04:17:41 +0000 (04:17 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 29 May 2000 04:17:41 +0000 (04:17 +0000)
Obtained from:
Submitted by:
Reviewed by:

  One last precursor to the common code base for Win32 rewrite_args from
  it's MPM.  Since we need to walk the arg list... why maintain it in
  several places.  This patch adds the AP_SERVER_BASEARGS definition to
  the header, so any mpm (and mod_info, for example) can know what args
  are legitimate, even when they plan to ignore them.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85340 13f79535-47bb-0310-9956-ffa450edef68

include/http_main.h
server/main.c

index 9c563627b3a457bc30b7e74aeaf2e2f229e28c30..f23675bd18d8cf04f3812f44d0e4660a37e6fd4a 100644 (file)
 #ifndef APACHE_HTTP_MAIN_H
 #define APACHE_HTTP_MAIN_H
 
+/* AP_SERVER_BASEARGS is the command argument list parsed by http_main.c
+ * in ap_getopt() format.  Use this for default'ing args that the MPM
+ * can safely ignore and pass on from its rewrite_args() handler.
+ */
+#define AP_SERVER_BASEARGS "C:c:D:d:f:vVlLth?"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
index 1a796efc51b026b76005397c56904d4e6e885419..d9b626380ba8ee4b1b285567ede7f93ebc145569 100644 (file)
@@ -294,7 +294,7 @@ API_EXPORT(int)        main(int argc, char *argv[])
     ap_pool_t *pconf;
     ap_pool_t *plog; /* Pool of log streams, reset _after_ each read of conf */
     ap_pool_t *ptemp; /* Pool for temporary config stuff, reset often */
-    ap_pool_t *pcommands; /* Pool for -C and -c switches */
+    ap_pool_t *pcommands; /* Pool for -D, -C and -c switches */
     module **mod;
 
 #ifndef WIN32 /* done in main_win32.c */
@@ -322,7 +322,11 @@ API_EXPORT(int)        main(int argc, char *argv[])
 
     ap_run_rewrite_args(process);
 
-    while (ap_getopt(argc, argv, "C:c:D:d:f:vVlLth?", &c, pcommands) == APR_SUCCESS) {
+    /* Maintain AP_SERVER_BASEARGS list in http_main.h to allow the MPM 
+     * to safely pass on our args from its rewrite_args() handler.
+     */
+    while (ap_getopt(argc, argv, AP_SERVER_BASEARGS, &c, pcommands) 
+            == APR_SUCCESS) {
         char **new;
         switch (c) {
        case 'c':