httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@locus.apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_cgi.c
Date Wed, 13 Dec 2000 18:01:23 GMT
wrowe       00/12/13 10:01:22

  Modified:    src      CHANGES
               src/modules/standard mod_cgi.c
  Log:
    *) mod_cgi on Win32 and Netware now does a more effective job of
       capturing all stderr output from user's scripts.  PR6161
  
  Submitted by:	Hardy Braunsdorf <hardy.braunsdorf@metechnology.com>
  Reviewed by:	William Rowe
  
  Revision  Changes    Path
  1.1606    +4 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1605
  retrieving revision 1.1606
  diff -u -r1.1605 -r1.1606
  --- CHANGES	2000/12/13 05:06:41	1.1605
  +++ CHANGES	2000/12/13 18:01:19	1.1606
  @@ -1,5 +1,9 @@
   Changes with Apache 1.3.15
   
  +  *) mod_cgi on Win32 and Netware now does a more effective job of
  +     capturing all stderr output from user's scripts.  PR6161
  +     [Hardy Braunsdorf <hardy.braunsdorf@metechnology.com>, Will Rowe]
  +
     *) mod_status now respects ?refresh=n of 1 or greater.  If the given
        refresh value is not a number, ?refresh is set to 1 second.
        [William Rowe, Dirk Ahlers <there@darkride.net> PR5067]
  
  
  
  1.96      +24 -5     apache-1.3/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- mod_cgi.c	2000/11/14 09:57:20	1.95
  +++ mod_cgi.c	2000/12/13 18:01:21	1.96
  @@ -529,9 +529,19 @@
   	    while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0) {
   		continue;
   	    }
  -	    while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
  -		continue;
  -	    }
  +#if defined(WIN32) || defined(NETWARE)
  +            /* Soak up stderr and redirect it to the error log.
  +             * Script output to stderr is already directed to the error log
  +             * on Unix, thanks to the magic of fork().
  +             */
  +            while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
  +                ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r, 
  +                              "%s", argsbuffer);            
  +            }
  +#else
  +	    while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
  +	        continue;
  +#endif
   	    ap_kill_timeout(r);
   
   
  @@ -564,9 +574,18 @@
   	ap_bclose(script_in);
   
   	ap_soft_timeout("soaking script stderr", r);
  -	while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
  +#if defined(WIN32) || defined(NETWARE)
  +        /* Script output to stderr is already directed to the error log
  +         * on Unix, thanks to the magic of fork().
  +         */
  +        while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0) {
  +            ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, r, 
  +                          "%s", argsbuffer);            
  +        }
  +#else
  +	while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_err) > 0)
   	    continue;
  -	}
  +#endif
   	ap_kill_timeout(r);
   	ap_bclose(script_err);
       }
  
  
  

Mime
View raw message