mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 22:04:34 +02:00
Update host string after SSL_set_tlsext_host_name
This commit is contained in:
committed by
Mohammad Nejati
parent
40c22cbfa7
commit
dc154bc0bd
@@ -114,11 +114,6 @@ public:
|
||||
if(ec)
|
||||
return fail(ec, "connect");
|
||||
|
||||
// Update the host_ string. This will provide the value of the
|
||||
// Host HTTP header during the WebSocket handshake.
|
||||
// See https://tools.ietf.org/html/rfc7230#section-5.4
|
||||
host_ += ':' + std::to_string(ep.port());
|
||||
|
||||
// Set a timeout on the operation
|
||||
beast::get_lowest_layer(ws_).expires_after(std::chrono::seconds(30));
|
||||
|
||||
@@ -132,6 +127,11 @@ public:
|
||||
return fail(ec, "connect");
|
||||
}
|
||||
|
||||
// Update the host_ string. This will provide the value of the
|
||||
// Host HTTP header during the WebSocket handshake.
|
||||
// See https://tools.ietf.org/html/rfc7230#section-5.4
|
||||
host_ += ':' + std::to_string(ep.port());
|
||||
|
||||
// Perform the SSL handshake
|
||||
ws_.next_layer().async_handshake(
|
||||
ssl::stream_base::client,
|
||||
|
Reference in New Issue
Block a user