[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-cvs
Subject:    cvs commit: httpd-2.0/server main.c
From:       wrowe () apache ! org
Date:       2001-11-29 7:10:40
[Download RAW message or body]

wrowe       01/11/28 23:10:40

  Modified:    server   main.c
  Log:
    We never tested for invalid 'additional' arguments that were ignored.
    Was there any point to allowing additional, unused args after the
    various supported switches?
  
    This prevents the Apache server from starting with an httpd somefooness
    invocation.
  
  Revision  Changes    Path
  1.105     +10 -1     httpd-2.0/server/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/main.c,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- main.c	2001/11/29 04:06:05	1.104
  +++ main.c	2001/11/29 07:10:40	1.105
  @@ -374,7 +374,16 @@
   	}
       }
   
  -    if (rv != APR_EOF) { /* bad cmdline option */
  +    /* bad cmdline option?  then we die */
  +    if (rv != APR_EOF) { 
  +        usage(process);
  +    }
  +// C:\apache2\bin\apache.exe: illegal option -- q
  +    /* 'extra' argument ignored?  then we die */
  +    if (opt->ind < opt->argc) {
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                     "Unused argument %s\n",
  +                     opt->argv[opt->ind]);
           usage(process);
       }
   
  
  
  

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic