Return-Path: Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 13880 invoked by uid 500); 13 Jun 2002 06:36:42 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 13869 invoked by uid 500); 13 Jun 2002 06:36:42 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 13 Jun 2002 06:36:41 -0000 Message-ID: <20020613063641.46264.qmail@icarus.apache.org> From: jerenkrantz@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/generators mod_cgi.c X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jerenkrantz 2002/06/12 23:36:40 Modified: . CHANGES modules/generators mod_cgi.c Log: Per RFC 2616 section 9.4, we SHOULD return the content-length if possible on HEAD requests (even for CGI requests). Also do it because it fixes the cause of .37's demise. This also fixes a condition seen on FreeBSD-4.6 where HEAD requests on CGI scripts would hang because the OS would return EAGAIN in log_script_err (via apr_file_gets). Since we never read the script output, this caused FreeBSD to not let us read stderr. Revision Changes Path 1.824 +4 -1 httpd-2.0/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/httpd-2.0/CHANGES,v retrieving revision 1.823 retrieving revision 1.824 diff -u -r1.823 -r1.824 --- CHANGES 12 Jun 2002 21:46:50 -0000 1.823 +++ CHANGES 13 Jun 2002 06:36:40 -0000 1.824 @@ -1,5 +1,8 @@ - Changes with Apache 2.0.38 + + *) Allow CGI scripts to return their Content-Length. This also fixes a + hang on HEAD requests seen on certain platforms (such as FreeBSD). + [Justin Erenkrantz] *) Added log rotation based on file size to the RotateLog support utility. [Brad Nicholes] 1.143 +1 -3 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.142 retrieving revision 1.143 diff -u -r1.142 -r1.143 --- mod_cgi.c 12 Jun 2002 23:59:30 -0000 1.142 +++ mod_cgi.c 13 Jun 2002 06:36:40 -0000 1.143 @@ -798,9 +798,7 @@ return HTTP_MOVED_TEMPORARILY; } - if (!r->header_only) { - ap_pass_brigade(r->output_filters, bb); - } + ap_pass_brigade(r->output_filters, bb); log_script_err(r, script_err); apr_file_close(script_err);