Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4694

Some refactoring after SPDY is removed

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0.0
    • Component/s: Core, HTTP
    • Labels:
      None

      Description

      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. Susan Hinrichs had some ideas around this 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);
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                masaori Masaori Koshiba
                Reporter:
                zwoop Leif Hedstrom
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 10m
                  2h 10m