diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index da34f053028..4fdb683b936 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -757,15 +757,13 @@ how_to_open_connection(HttpTransact::State *s) break; } - s->cdn_saved_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN; + HttpTransact::StateMachineAction_t connect_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN; // Setting up a direct CONNECT tunnel enters OriginServerRawOpen. We always do that if we // are not forwarding CONNECT and are not going to a parent proxy. if (s->method == HTTP_WKSIDX_CONNECT) { - if (s->txn_conf->forward_connect_method == 1 || s->parent_result.result == PARENT_SPECIFIED) { - s->cdn_saved_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN; - } else { - s->cdn_saved_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_RAW_OPEN; + if (s->txn_conf->forward_connect_method != 1 && s->parent_result.result != PARENT_SPECIFIED) { + connect_next_action = HttpTransact::SM_ACTION_ORIGIN_SERVER_RAW_OPEN; } } @@ -774,9 +772,7 @@ how_to_open_connection(HttpTransact::State *s) HttpTransactHeaders::convert_request(s->current.server->http_version, &s->hdr_info.server_request); } - ink_assert(s->cdn_saved_next_action == HttpTransact::SM_ACTION_ORIGIN_SERVER_OPEN || - s->cdn_saved_next_action == HttpTransact::SM_ACTION_ORIGIN_SERVER_RAW_OPEN); - return s->cdn_saved_next_action; + return connect_next_action; } /***************************************************************************** @@ -2020,19 +2016,8 @@ HttpTransact::OSDNSLookup(State *s) // After SM_ACTION_DNS_LOOKUP, goto the saved action/state ORIGIN_SERVER_(RAW_)OPEN. // Should we skip the StartAccessControl()? why? - if (s->cdn_remap_complete) { - TxnDebug("cdn", "This is a late DNS lookup. We are going to the OS, " - "not to HandleFiltering."); - - ink_assert(s->cdn_saved_next_action == SM_ACTION_ORIGIN_SERVER_OPEN || - s->cdn_saved_next_action == SM_ACTION_ORIGIN_SERVER_RAW_OPEN); - TxnDebug("cdn", "outgoing version -- (pre conversion) %d", s->hdr_info.server_request.m_http->m_version); - (&s->hdr_info.server_request)->version_set(HTTPVersion(1, 1)); - HttpTransactHeaders::convert_request(s->current.server->http_version, &s->hdr_info.server_request); - TxnDebug("cdn", "outgoing version -- (post conversion) %d", s->hdr_info.server_request.m_http->m_version); - TRANSACT_RETURN(s->cdn_saved_next_action, nullptr); - } else if (DNSLookupInfo::OS_Addr::OS_ADDR_USE_CLIENT == s->dns_info.os_addr_style || - DNSLookupInfo::OS_Addr::OS_ADDR_USE_HOSTDB == s->dns_info.os_addr_style) { + if (DNSLookupInfo::OS_Addr::OS_ADDR_USE_CLIENT == s->dns_info.os_addr_style || + DNSLookupInfo::OS_Addr::OS_ADDR_USE_HOSTDB == s->dns_info.os_addr_style) { // we've come back after already trying the server to get a better address // and finished with all backtracking - return to trying the server. TRANSACT_RETURN(how_to_open_connection(s), HttpTransact::HandleResponse); diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h index df7986a4588..a3ff52e723e 100644 --- a/proxy/http/HttpTransact.h +++ b/proxy/http/HttpTransact.h @@ -702,12 +702,6 @@ class HttpTransact // able to defer some work in building the request TransactFunc_t pending_work = nullptr; - // Sandbox of Variables - StateMachineAction_t cdn_saved_next_action = SM_ACTION_UNDEFINED; - void (*cdn_saved_transact_return_point)(State *s) = nullptr; - bool cdn_remap_complete = false; - bool first_dns_lookup = true; - HttpRequestData request_data; ParentConfigParams *parent_params = nullptr; std::shared_ptr next_hop_strategy = nullptr;