Changes with Apache 2.0.30-dev
+ *) Prevent the Win32 port from continuing after encountering an
+ error in the command line args to apache. [William Rowe]
+
*) On a error in the proxy, make it write a line to the error log
[Ian Holsman]
optbuf[0] = '-';
optbuf[2] = '\0';
apr_getopt_init(&opt, process->pool, process->argc, (char**) process->argv);
- while (apr_getopt(opt, "n:k:iu" AP_SERVER_BASEARGS,
- optbuf + 1, &optarg) == APR_SUCCESS) {
+ opt->errfn = NULL;
+ while ((rv = apr_getopt(opt, "n:k:iu" AP_SERVER_BASEARGS,
+ optbuf + 1, &optarg)) == APR_SUCCESS) {
switch (optbuf[1]) {
case 'n':
service_set = mpm_service_set_name(process->pool, &service_name,
}
}
+ /* back up to capture the bad argument */
+ if (rv == APR_BADCH || rv == APR_BADARG) {
+ opt->ind--;
+ }
+
+ while (opt->ind < opt->argc) {
+ *(const char **)apr_array_push(mpm_new_argv) =
+ apr_pstrdup(process->pool, opt->argv[opt->ind++]);
+ }
+
/* Track the number of args actually entered by the user */
inst_argc = mpm_new_argv->nelts - fixed_args;