You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2002/06/08 00:31:34 UTC
cvs commit: httpd-2.0/server protocol.c
rbb 2002/06/07 15:31:34
Modified: modules/dav/main mod_dav.c
modules/http http_request.c
server protocol.c
Log:
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.
Revision Changes Path
1.80 +0 -9 httpd-2.0/modules/dav/main/mod_dav.c
Index: mod_dav.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- mod_dav.c 17 May 2002 11:33:08 -0000 1.79
+++ mod_dav.c 7 Jun 2002 22:31:34 -0000 1.80
@@ -354,9 +354,6 @@
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... */
ap_rvputs(r,
DAV_RESPONSE_BODY_1,
@@ -391,9 +388,6 @@
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
"<D:error xmlns:D=\"DAV:\"", r);
@@ -594,9 +588,6 @@
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. */
dav_send_multistatus(r, err->status, response, NULL);
1.146 +0 -11 httpd-2.0/modules/http/http_request.c
Index: http_request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- http_request.c 31 May 2002 07:37:19 -0000 1.145
+++ http_request.c 7 Jun 2002 22:31:34 -0000 1.146
@@ -145,17 +145,6 @@
if (ap_status_drops_connection(r->status)) {
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
1.105 +2 -1 httpd-2.0/server/protocol.c
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- protocol.c 17 May 2002 11:11:37 -0000 1.104
+++ protocol.c 7 Jun 2002 22:31:34 -0000 1.105
@@ -969,7 +969,6 @@
"client sent an unrecognized expectation value of "
"Expect: %s", expect);
ap_send_error_response(r, 0);
- (void) ap_discard_request_body(r);
ap_run_log_transaction(r);
return r;
}
@@ -1044,6 +1043,8 @@
*/
AP_DECLARE(void) ap_finalize_request_protocol(request_rec *r)
{
+ (void) ap_discard_request_body(r);
+
while (r->next) {
r = r->next;
}