From ad666344238e69d4db47ff745a0f42e44a048b70 Mon Sep 17 00:00:00 2001 From: Susan Hinrichs Date: Tue, 22 May 2018 12:40:05 -0500 Subject: [PATCH] Two more places to check whether attempting half_closed connection logic is feasible. --- proxy/ProxyClientSession.cc | 3 ++- proxy/http/HttpSM.cc | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/proxy/ProxyClientSession.cc b/proxy/ProxyClientSession.cc index 2d7cf8d465e..e24f43b9916 100644 --- a/proxy/ProxyClientSession.cc +++ b/proxy/ProxyClientSession.cc @@ -224,7 +224,8 @@ ProxyClientSession::handle_api_return(int event) break; } default: - Fatal("received invalid session hook %s (%d)", HttpDebugNames::get_api_hook_name(hookid), hookid); + Error("received invalid session hook %s (%d)", HttpDebugNames::get_api_hook_name(hookid), hookid); + ink_release_assert(false); break; } } diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc index 765a01413fa..2cdbde48921 100644 --- a/proxy/http/HttpSM.cc +++ b/proxy/http/HttpSM.cc @@ -3200,7 +3200,8 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer *c) c->write_success = true; t_state.client_info.abort = HttpTransact::DIDNOT_ABORT; if (t_state.client_info.keep_alive == HTTP_KEEPALIVE) { - if (t_state.www_auth_content != HttpTransact::CACHE_AUTH_SERVE || ua_txn->get_server_session()) { + if (ua_txn->allow_half_open() && + (t_state.www_auth_content != HttpTransact::CACHE_AUTH_SERVE || ua_txn->get_server_session())) { // successful keep-alive close_connection = false; } @@ -3261,8 +3262,8 @@ HttpSM::tunnel_handler_ua(int event, HttpTunnelConsumer *c) is_eligible_post_request &= !vc->get_is_internal_request(); } } - if ((is_eligible_post_request || t_state.client_info.pipeline_possible == true) && c->producer->vc_type != HT_STATIC && - event == VC_EVENT_WRITE_COMPLETE) { + if ((is_eligible_post_request || t_state.client_info.pipeline_possible == true) && ua_txn->allow_half_open() && + c->producer->vc_type != HT_STATIC && event == VC_EVENT_WRITE_COMPLETE) { ua_txn->set_half_close_flag(true); }