You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2018/03/14 21:05:15 UTC
[trafficserver] branch 7.1.x updated: Stop connection reattempts on
origin which sends EOS on no data.
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/7.1.x by this push:
new 6d19409 Stop connection reattempts on origin which sends EOS on no data.
6d19409 is described below
commit 6d19409f9aa78c71419aaf09fc309e0075c555f7
Author: Susan Hinrichs <sh...@apache.org>
AuthorDate: Mon Mar 12 10:21:02 2018 -0500
Stop connection reattempts on origin which sends EOS on no data.
(cherry picked from commit bba6321e6305f6321ebb5d571c5ad382ab3acf20)
---
proxy/http/HttpSM.cc | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 0b2737c..13600d1 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -1789,16 +1789,6 @@ HttpSM::state_read_server_response_header(int event, void *data)
case VC_EVENT_EOS:
server_entry->eos = true;
- // If no bytes were transmitted, the parser treats
- // as a good 0.9 response which is technically is
- // but it's indistinguishable from an overloaded
- // server closing the connection so don't accept
- // zero length responses
- if (vio->ndone == 0) {
- // Error handling function
- handle_server_setup_error(event, data);
- return 0;
- }
// Fall through
case VC_EVENT_READ_READY:
case VC_EVENT_READ_COMPLETE:
@@ -1839,12 +1829,11 @@ HttpSM::state_read_server_response_header(int event, void *data)
server_response_hdr_bytes += bytes_used;
- // Don't allow 0.9 (unparsable headers) on keep-alive connections after
- // the connection has already served a transaction as what we are likely
- // looking at is garbage on a keep-alive channel corrupted by the origin
- // server
- if (state == PARSE_RESULT_DONE && t_state.hdr_info.server_response.version_get() == HTTPVersion(0, 9) &&
- server_session->transact_count > 1) {
+ // Don't allow HTTP 0.9 (unparsable headers) on resued connections.
+ // And don't allow empty headers from closed connections
+ if ((state == PARSE_RESULT_DONE && t_state.hdr_info.server_response.version_get() == HTTPVersion(0, 9) &&
+ server_session->transact_count > 1) ||
+ (server_entry->eos && vio->ndone == 0)) {
state = PARSE_RESULT_ERROR;
}
// Check to see if we are over the hdr size limit
--
To stop receiving notification emails like this one, please contact
zwoop@apache.org.