Move Accept-CH value in TLS server handshaker to avoid one string copy.
PiperOrigin-RevId: 355662694
Change-Id: If38f7b198f7a9262300e4b4aab9cb5f06ffb4c00
diff --git a/quic/core/tls_server_handshaker.cc b/quic/core/tls_server_handshaker.cc
index c16eba9..f1a2d86 100644
--- a/quic/core/tls_server_handshaker.cc
+++ b/quic/core/tls_server_handshaker.cc
@@ -984,7 +984,7 @@
const std::string& origin = crypto_negotiated_params_->sni;
std::string accept_ch_value = GetAcceptChValueForOrigin(origin);
if (!accept_ch_value.empty()) {
- AcceptChFrame frame{{{origin, accept_ch_value}}};
+ AcceptChFrame frame{{{origin, std::move(accept_ch_value)}}};
alps_length = HttpEncoder::SerializeAcceptChFrame(frame, &buffer);
alps_data = reinterpret_cast<const uint8_t*>(buffer.get());
}