walkor 1 년 전
부모
커밋
7cbeb8036e
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Protocols/Ws.php

+ 1 - 1
src/Protocols/Ws.php

@@ -361,7 +361,7 @@ class Ws
         }
         }
         // Get Host.
         // Get Host.
         $port = $connection->getRemotePort();
         $port = $connection->getRemotePort();
-        $host = $port === 80 ? $connection->getRemoteHost() : $connection->getRemoteHost() . ':' . $port;
+        $host = $port === 80 || $port === 443 ? $connection->getRemoteHost() : $connection->getRemoteHost() . ':' . $port;
         // Handshake header.
         // Handshake header.
         $connection->context->websocketSecKey = base64_encode(random_bytes(16));
         $connection->context->websocketSecKey = base64_encode(random_bytes(16));
         $userHeader = $connection->headers ?? null;
         $userHeader = $connection->headers ?? null;