mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Call ap_discard_request_body from ap_finalize_request. Remove the call
from all other modules that do not use it to determine the response for the request. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95576 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -354,9 +354,6 @@ static int dav_error_response(request_rec *r, int status, const char *body)
|
|||||||
|
|
||||||
ap_set_content_type(r, "text/html");
|
ap_set_content_type(r, "text/html");
|
||||||
|
|
||||||
/* since we're returning DONE, ensure the request body is consumed. */
|
|
||||||
(void) ap_discard_request_body(r);
|
|
||||||
|
|
||||||
/* begin the response now... */
|
/* begin the response now... */
|
||||||
ap_rvputs(r,
|
ap_rvputs(r,
|
||||||
DAV_RESPONSE_BODY_1,
|
DAV_RESPONSE_BODY_1,
|
||||||
@@ -391,9 +388,6 @@ static int dav_error_response_tag(request_rec *r,
|
|||||||
|
|
||||||
ap_set_content_type(r, DAV_XML_CONTENT_TYPE);
|
ap_set_content_type(r, DAV_XML_CONTENT_TYPE);
|
||||||
|
|
||||||
/* since we're returning DONE, ensure the request body is consumed. */
|
|
||||||
(void) ap_discard_request_body(r);
|
|
||||||
|
|
||||||
ap_rputs(DAV_XML_HEADER DEBUG_CR
|
ap_rputs(DAV_XML_HEADER DEBUG_CR
|
||||||
"<D:error xmlns:D=\"DAV:\"", r);
|
"<D:error xmlns:D=\"DAV:\"", r);
|
||||||
|
|
||||||
@@ -595,9 +589,6 @@ static int dav_handle_err(request_rec *r, dav_error *err,
|
|||||||
return err->status;
|
return err->status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* since we're returning DONE, ensure the request body is consumed. */
|
|
||||||
(void) ap_discard_request_body(r);
|
|
||||||
|
|
||||||
/* send the multistatus and tell Apache the request/response is DONE. */
|
/* send the multistatus and tell Apache the request/response is DONE. */
|
||||||
dav_send_multistatus(r, err->status, response, NULL);
|
dav_send_multistatus(r, err->status, response, NULL);
|
||||||
return DONE;
|
return DONE;
|
||||||
|
@@ -145,17 +145,6 @@ AP_DECLARE(void) ap_die(int type, request_rec *r)
|
|||||||
if (ap_status_drops_connection(r->status)) {
|
if (ap_status_drops_connection(r->status)) {
|
||||||
r->connection->keepalive = 0;
|
r->connection->keepalive = 0;
|
||||||
}
|
}
|
||||||
else if ((r->status != HTTP_NOT_MODIFIED) &&
|
|
||||||
(r->status != HTTP_NO_CONTENT) &&
|
|
||||||
r->connection && (r->connection->keepalive != -1)) {
|
|
||||||
/* If the discard returns AP_FILTER_ERROR, it means that we went
|
|
||||||
* recursive on ourselves and we should abort.
|
|
||||||
*/
|
|
||||||
int errstatus = ap_discard_request_body(r);
|
|
||||||
if (errstatus == AP_FILTER_ERROR) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Two types of custom redirects --- plain text, and URLs. Plain text has
|
* Two types of custom redirects --- plain text, and URLs. Plain text has
|
||||||
|
@@ -969,7 +969,6 @@ request_rec *ap_read_request(conn_rec *conn)
|
|||||||
"client sent an unrecognized expectation value of "
|
"client sent an unrecognized expectation value of "
|
||||||
"Expect: %s", expect);
|
"Expect: %s", expect);
|
||||||
ap_send_error_response(r, 0);
|
ap_send_error_response(r, 0);
|
||||||
(void) ap_discard_request_body(r);
|
|
||||||
ap_run_log_transaction(r);
|
ap_run_log_transaction(r);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -1044,6 +1043,8 @@ void ap_finalize_sub_req_protocol(request_rec *sub)
|
|||||||
*/
|
*/
|
||||||
AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r)
|
AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r)
|
||||||
{
|
{
|
||||||
|
(void) ap_discard_request_body(r);
|
||||||
|
|
||||||
while (r->next) {
|
while (r->next) {
|
||||||
r = r->next;
|
r = r->next;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user