zwoop opened a new issue #7607:
URL: https://github.com/apache/trafficserver/issues/7607


   It seems that rather than parsing these types of "text" configs once, we 
parse it over and over again (strcmp()) on each transaction hitting this code:
   
   ```
   std::string_view
   HttpSM::get_outbound_sni() const
   {
     using namespace ts::literals;
     ts::TextView zret;
     ts::TextView policy{t_state.txn_conf->ssl_client_sni_policy, 
ts::TextView::npos};
   
     if (policy.empty() || !strcmp(policy, "host"_tv)) {
       // By default the host header field value is used for the SNI.
       int len;
       char const *ptr = t_state.hdr_info.server_request.host_get(&len);
       zret.assign(ptr, len);
     } else if (ua_txn && !strcmp(policy, "server_name"_tv)) {
       zret.assign(ua_txn->get_netvc()->get_server_name(), ts::TextView::npos);
     } else if (policy.front() == '@') { // guaranteed non-empty from previous 
clause
       zret = policy.remove_prefix(1);
     } else {
       // If other is specified, like "remap" and "verify_with_name_source", 
the remapped origin name is used for the SNI value
       zret.assign(t_state.server_info.name, ts::TextView::npos);
     }
     return zret;
   }
   ````


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to