mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Fix TLS SNI handling in websocket_client_async_ssl example:
Original commit message fixed an error in websocket_client_async_ssl close #2315 in this example host_ string should be updated after SSL_set_tlsext_host_name just like the synced version, otherwise this would cause a handshake error
This commit is contained in:
committed by
Richard Hodges
parent
91c0df61d0
commit
b16005a456
@@ -1,5 +1,6 @@
|
||||
Version XXX:
|
||||
|
||||
* Fix TLS SNI handling in websocket_client_async_ssl example.
|
||||
* Fix reuse of sliding window in WebSocket permessage_deflate.
|
||||
* Fix accept error handling in http_server_async example.
|
||||
* Move library-specific docca configuration to Beast.
|
||||
|
@@ -106,11 +106,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));
|
||||
|
||||
@@ -124,6 +119,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