masaori335 commented on a change in pull request #7533:
URL: https://github.com/apache/trafficserver/pull/7533#discussion_r595601556
##########
File path: proxy/http/HttpSM.cc
##########
@@ -4874,6 +4874,8 @@ HttpSM::get_outbound_sni() const
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);
Review comment:
If the policy is not empty, unfortunately, yes. I agree with we should
avoid these `strcmp` with fixed strings except `@...` format.
https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html?highlight=proxy.config.ssl.client.sni_policy#proxy-config-ssl-client-sni-policy
----------------------------------------------------------------
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]