]> granicus.if.org Git - apache/commitdiff
Per RFC 2616 section 9.4, we SHOULD return the content-length if possible on
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 13 Jun 2002 06:36:40 +0000 (06:36 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 13 Jun 2002 06:36:40 +0000 (06:36 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95633 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/generators/mod_cgi.c

diff --git a/CHANGES b/CHANGES
index f80eeab4d8a33f514114bdbb8d498d8ea39978bb..7221663a6ea6fc8153168d37d5d3cad8dc9c9a9f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-
 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]
 
index daad028808def72829adc5d1df13880c527fd895..7914df702467356d41a83e810811d71eced0b7cd 100644 (file)
@@ -798,9 +798,7 @@ static int cgi_handler(request_rec *r)
             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);