From 677c482d6327e9ea93cad43ae8dffd29862af670 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Mon, 29 May 2000 04:17:41 +0000 Subject: [PATCH] PR: 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 | 6 ++++++ server/main.c | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/http_main.h b/include/http_main.h index 9c563627b3..f23675bd18 100644 --- a/include/http_main.h +++ b/include/http_main.h @@ -59,6 +59,12 @@ #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 diff --git a/server/main.c b/server/main.c index 1a796efc51..d9b626380b 100644 --- a/server/main.c +++ b/server/main.c @@ -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': -- 2.50.1