Leif Hedstrom created TS-4694:
---------------------------------
Summary: Some refactoring after SPDY is removed
Key: TS-4694
URL: https://issues.apache.org/jira/browse/TS-4694
Project: Traffic Server
Issue Type: Improvement
Components: Core, HTTP
Reporter: Leif Hedstrom
There's a place in the code with a comment about refactoring this once we
remove SPDY (see below). I'm filing this separates from TS-4311, because I'm
not sure what this refactoring entails. [~shinrich] had some ideas around this
code :).
{code}
void
ProxyClientTransaction::new_transaction()
{
ink_assert(current_reader == NULL);
// Defensive programming, make sure nothing persists across
// connection re-use
ink_release_assert(parent != NULL);
current_reader = HttpSM::allocate();
current_reader->init();
DebugHttpTxn("[%" PRId64 "] Starting transaction %d using sm [%" PRId64 "]",
parent->connection_id(),
parent->get_transact_count(), current_reader->sm_id);
// This is a temporary hack until we get rid of SPDY and can use virutal
methods entirely
// to track protocol.
PluginIdentity *pi = dynamic_cast<PluginIdentity *>(this->get_netvc());
if (pi) {
current_reader->plugin_tag = pi->getPluginTag();
current_reader->plugin_id = pi->getPluginId();
} else {
const char *protocol_str = this->get_protocol_string();
// We don't set the plugin_tag for http, though in future we should
probably log http as protocol
if (strlen(protocol_str) != 4 || strncmp("http", protocol_str, 4)) {
current_reader->plugin_tag = protocol_str;
// Since there is no more plugin, there is no plugin id for http/2
// We are copying along the plugin_tag as a standin for protocol name for
logging
// and to detect a case in HttpTransaction (TS-3954)
}
}
current_reader->attach_client_session(this, sm_reader);
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)