diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-06-13 06:36:40 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-06-13 06:36:40 +0000 |
commit | b5bc68a4d243e1569073ae1768dde6e22f02d9e7 (patch) | |
tree | 8642323325a0480a6d2389c93675ccf5c669ded8 | |
parent | 6144c7a643e4de8d271ab97e4100c758861218eb (diff) | |
download | httpd-b5bc68a4d243e1569073ae1768dde6e22f02d9e7.tar.gz |
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.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95633 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | modules/generators/mod_cgi.c | 4 |
2 files changed, 5 insertions, 4 deletions
@@ -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] diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index daad028808..7914df7024 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -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); |