httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_cgi.c
Date Wed, 05 May 2004 15:30:53 GMT
jorton      2004/05/05 08:30:53

  Modified:    modules/generators mod_cgi.c
  Log:
  * modules/generators/mod_cgi.c (cgi_handler): Soak up stderr from nph-
  scripts correctly.
  
  PR: 18348
  Submitted by: Jeff Trawick (in mod_jcgi)
  
  Revision  Changes    Path
  1.163     +12 -14    httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -w -d -u -r1.162 -r1.163
  --- mod_cgi.c	5 May 2004 14:52:44 -0000	1.162
  +++ mod_cgi.c	5 May 2004 15:30:53 -0000	1.163
  @@ -942,19 +942,6 @@
           }
   
           rv = ap_pass_brigade(r->output_filters, bb);
  -
  -        /* don't soak up script output if errors occurred
  -         * writing it out...  otherwise, we prolong the
  -         * life of the script when the connection drops
  -         * or we stopped sending output for some other
  -         * reason
  -         */
  -        if (rv == APR_SUCCESS && !r->connection->aborted) {
  -            apr_file_pipe_timeout_set(script_err, r->server->timeout);
  -            log_script_err(r, script_err);
  -        }
  -
  -        apr_file_close(script_err);
       }
       else /* nph */ {
           struct ap_filter_t *cur;
  @@ -970,8 +957,19 @@
           }
           r->output_filters = r->proto_output_filters = cur;
   
  -        ap_pass_brigade(r->output_filters, bb);
  +        rv = ap_pass_brigade(r->output_filters, bb);
       }
  +
  +    /* don't soak up script output if errors occurred writing it
  +     * out...  otherwise, we prolong the life of the script when the
  +     * connection drops or we stopped sending output for some other
  +     * reason */
  +    if (rv == APR_SUCCESS && !r->connection->aborted) {
  +        apr_file_pipe_timeout_set(script_err, r->server->timeout);
  +        log_script_err(r, script_err);
  +    }
  +    
  +    apr_file_close(script_err);
   
       return OK;                      /* NOT r->status, even if it has changed. */
   }
  
  
  

Mime
View raw message