This is an automated email from the ASF dual-hosted git repository.
sorber pushed a commit to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/6.2.x by this push:
new f9b9d3a Close the connection when returning a 400 error response
f9b9d3a is described below
commit f9b9d3a12cee7843b940b04745cce06c1b890a70
Author: Bryan Call <[email protected]>
AuthorDate: Wed Feb 28 14:45:06 2018 -0800
Close the connection when returning a 400 error response
(cherry picked from commit fe9c1276aba6768e78b72a486c07e7b853214b09)
---
proxy/http/HttpTransact.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 00990e3..0177187 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -8136,6 +8136,11 @@ HttpTransact::build_error_response(State *s, HTTPStatus
status_code, const char
s->client_info.keep_alive = HTTP_NO_KEEPALIVE;
}
+ // If there is a parse error on reading the request it can leave reading the
request stream in an undetermined state
+ if (status_code == HTTP_STATUS_BAD_REQUEST) {
+ s->client_info.keep_alive = HTTP_NO_KEEPALIVE;
+ }
+
switch (status_code) {
case HTTP_STATUS_BAD_REQUEST:
SET_VIA_STRING(VIA_CLIENT_REQUEST, VIA_CLIENT_ERROR);