You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2006/01/22 00:22:29 UTC
svn commit: r371132 - /httpd/httpd/trunk/server/protocol.c
Author: rpluem
Date: Sat Jan 21 15:22:23 2006
New Revision: 371132
URL: http://svn.apache.org/viewcvs?rev=371132&view=rev
Log:
* Improve fix for PR38123. This fixes PR38123 and PR37790 (whose fix has been
already backported) by inserting the HTTP_IN filter uncondionally before
we call ap_send_error_response or ap_die. This ensures that
ap_discard_request_body called by ap_die and by ap_send_error_response works
correctly on status codes that do not cause the connection to be dropped and
in situations where the connection should be kept alive.
Modified:
httpd/httpd/trunk/server/protocol.c
Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/protocol.c?rev=371132&r1=371131&r2=371132&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Sat Jan 21 15:22:23 2006
@@ -902,6 +902,16 @@
"(see RFC2616 section 14.23): %s", r->uri);
}
+ /*
+ * Add the HTTP_IN filter here to ensure that ap_discard_request_body
+ * called by ap_die and by ap_send_error_response works correctly on
+ * status codes that do not cause the connection to be dropped and
+ * in situations where the connection should be kept alive.
+ */
+
+ ap_add_input_filter_handle(ap_http_input_filter_handle,
+ NULL, r, r->connection);
+
if (r->status != HTTP_OK) {
ap_send_error_response(r, 0);
ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
@@ -910,8 +920,6 @@
}
if ((access_status = ap_run_post_read_request(r))) {
- ap_add_input_filter_handle(ap_http_input_filter_handle,
- NULL, r, r->connection);
ap_die(access_status, r);
ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
ap_run_log_transaction(r);
@@ -934,8 +942,6 @@
ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
"client sent an unrecognized expectation value of "
"Expect: %s", expect);
- ap_add_input_filter_handle(ap_http_input_filter_handle,
- NULL, r, r->connection);
ap_send_error_response(r, 0);
ap_update_child_status(conn->sbh, SERVER_BUSY_LOG, r);
ap_run_log_transaction(r);
@@ -943,8 +949,6 @@
}
}
- ap_add_input_filter_handle(ap_http_input_filter_handle,
- NULL, r, r->connection);
return r;
}