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
Changes with Apache 2.3.3
+ *) script support: avoid possibly sending contents with a 204 or 304
+ response. PR 40953 [Nick Kew]
+
*) ab: Fix a 100% CPU loop on platforms where a failed non-blocking connect
returns EINPROGRESS and a subsequent poll() returns only POLLERR.
Observed on HP-UX. [Eric Covener]
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)) {