|
|
@@ -371,12 +371,15 @@ class Websocket implements \Workerman\Protocols\ProtocolInterface
|
|
|
if (isset($connection->headers)) {
|
|
|
if (\is_array($connection->headers)) {
|
|
|
foreach ($connection->headers as $header) {
|
|
|
- if (\strpos($header, 'Server:') === 0) {
|
|
|
+ if (\stripos($header, 'Server:') === 0) {
|
|
|
$has_server_header = true;
|
|
|
}
|
|
|
$handshake_message .= "$header\r\n";
|
|
|
}
|
|
|
} else {
|
|
|
+ if (\stripos($connection->headers, 'Server:') !== false) {
|
|
|
+ $has_server_header = true;
|
|
|
+ }
|
|
|
$handshake_message .= "$connection->headers\r\n";
|
|
|
}
|
|
|
}
|