diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:46:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-11 16:46:30 +0000 |
commit | 854010bc34484a22f5e97ed21ea76e76cde6a9ca (patch) | |
tree | e2fe43eaaa3546c62c0fce539d775f9928c805f4 /src/shrpx_http_downstream_connection.cc | |
parent | Adding debian version 1.61.0-1. (diff) | |
download | nghttp2-854010bc34484a22f5e97ed21ea76e76cde6a9ca.tar.xz nghttp2-854010bc34484a22f5e97ed21ea76e76cde6a9ca.zip |
Merging upstream version 1.62.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shrpx_http_downstream_connection.cc')
-rw-r--r-- | src/shrpx_http_downstream_connection.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shrpx_http_downstream_connection.cc b/src/shrpx_http_downstream_connection.cc index 4164b8b..8031098 100644 --- a/src/shrpx_http_downstream_connection.cc +++ b/src/shrpx_http_downstream_connection.cc @@ -425,8 +425,8 @@ int HttpDownstreamConnection::initiate_connection() { auto sni_name = addr_->sni.empty() ? StringRef{addr_->host} : StringRef{addr_->sni}; - if (!util::numeric_host(sni_name.c_str())) { - SSL_set_tlsext_host_name(conn_.tls.ssl, sni_name.c_str()); + if (!util::numeric_host(sni_name.data())) { + SSL_set_tlsext_host_name(conn_.tls.ssl, sni_name.data()); } auto session = tls::reuse_tls_session(addr_->tls_session_cache); @@ -564,9 +564,10 @@ int HttpDownstreamConnection::push_request_headers() { return -1; } auto iov = make_byte_ref(balloc, base64::encode_length(nonce.size()) + 1); - auto p = base64::encode(std::begin(nonce), std::end(nonce), iov.base); + auto p = + base64::encode(std::begin(nonce), std::end(nonce), std::begin(iov)); *p = '\0'; - auto key = StringRef{iov.base, p}; + auto key = StringRef{std::span{std::begin(iov), p}}; downstream_->set_ws_key(key); buf->append("Sec-Websocket-Key: "); |