Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed Feb 25, 2024
1 parent 3b7f39c commit 7cbeb80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Protocols/Ws.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ public static function sendHandshake(AsyncTcpConnection $connection): void
}
// Get Host.
$port = $connection->getRemotePort();
$host = $port === 80 ? $connection->getRemoteHost() : $connection->getRemoteHost() . ':' . $port;
$host = $port === 80 || $port === 443 ? $connection->getRemoteHost() : $connection->getRemoteHost() . ':' . $port;
// Handshake header.
$connection->context->websocketSecKey = base64_encode(random_bytes(16));
$userHeader = $connection->headers ?? null;
Expand Down

0 comments on commit 7cbeb80

Please sign in to comment.