summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorNick Kew <niq@apache.org>2009-03-30 20:49:10 +0000
committerNick Kew <niq@apache.org>2009-03-30 20:49:10 +0000
commit7fe4728a292af36401333e4f03cd23b73e0c16dd (patch)
tree76c6bb7304b59679b56f13a4691e43abb0ba1bb0 /server
parent0464e456f6de7e9cd9f13cea22f874247a6525c9 (diff)
downloadhttpd-7fe4728a292af36401333e4f03cd23b73e0c16dd.tar.gz
HTTPD script support
When a script returns a no-body response code, pretend it was a HEAD request so as to drop any body the script might erroneously generate. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@760167 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/util_script.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/util_script.c b/server/util_script.c
index 14678ec310..682b2ab7de 100644
--- a/server/util_script.c
+++ b/server/util_script.c
@@ -462,6 +462,10 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
if ((cgi_status == HTTP_UNSET) && (r->method_number == M_GET)) {
cond_status = ap_meets_conditions(r);
}
+ else if ((cgi_status == HTTP_NO_CONTENT) ||
+ (cgi_status == HTTP_NOT_MODIFIED)) {
+ r->header_only = 1; /* discard any body */
+ }
apr_table_overlap(r->err_headers_out, merge,
APR_OVERLAP_TABLES_MERGE);
if (!apr_is_empty_table(cookie_table)) {