mirror of
https://github.com/apache/httpd.git
synced 2025-08-05 16:55:50 +03:00
*) core: add final_resp_passed
flag to request_rec to allow
ap_die() to judge if it can send out a response. Bump mmn. Enable test cases that check errors during response body to appear as error on client side. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -84,38 +84,25 @@ static void ap_die_r(int type, request_rec *r, int recursive_error)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* if we have already passed the final response down the
|
||||
* output filter chain, we cannot generate a second final
|
||||
* response here.
|
||||
*/
|
||||
if (r->final_resp_passed) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ap_is_HTTP_VALID_RESPONSE(type)) {
|
||||
ap_filter_t *next;
|
||||
|
||||
/*
|
||||
* Check if we still have the ap_http_header_filter in place. If
|
||||
* this is the case we should not ignore the error here because
|
||||
* it means that we have not sent any response at all and never
|
||||
* will. This is bad. Sent an internal server error instead.
|
||||
*/
|
||||
next = r->output_filters;
|
||||
while (next && (next->frec != ap_http_header_filter_handle)) {
|
||||
next = next->next;
|
||||
}
|
||||
|
||||
/*
|
||||
* If next != NULL then we left the while above because of
|
||||
* next->frec == ap_http_header_filter
|
||||
*/
|
||||
if (next) {
|
||||
if (type != AP_FILTER_ERROR) {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01579)
|
||||
"Invalid response status %i", type);
|
||||
}
|
||||
else {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02831)
|
||||
"Response from AP_FILTER_ERROR");
|
||||
}
|
||||
type = HTTP_INTERNAL_SERVER_ERROR;
|
||||
if (type != AP_FILTER_ERROR) {
|
||||
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01579)
|
||||
"Invalid response status %i", type);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(02831)
|
||||
"Response from AP_FILTER_ERROR");
|
||||
}
|
||||
type = HTTP_INTERNAL_SERVER_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user