diff --git a/src/Ratchet/Component/WAMP/WAMPServerComponent.php b/src/Ratchet/Component/WAMP/WAMPServerComponent.php index 4a4c6e3..d3f5dc1 100644 --- a/src/Ratchet/Component/WAMP/WAMPServerComponent.php +++ b/src/Ratchet/Component/WAMP/WAMPServerComponent.php @@ -87,7 +87,7 @@ class WAMPServerComponent implements WebSocketComponentInterface { }; $welcome = new Welcome($conn); - $welcome->setWelcome($conn->WAMP->sessionId, 'Ratchet/0.1'); + $welcome->setWelcome($conn->WAMP->sessionId, \Ratchet\Resource\VERSION); $this->_msg_buffer->enqueue($welcome); return $this->attachStack($this->_decorating->onOpen($conn)); diff --git a/src/Ratchet/Component/WebSocket/WebSocketComponent.php b/src/Ratchet/Component/WebSocket/WebSocketComponent.php index a2267fd..51586bd 100644 --- a/src/Ratchet/Component/WebSocket/WebSocketComponent.php +++ b/src/Ratchet/Component/WebSocket/WebSocketComponent.php @@ -62,6 +62,7 @@ class WebSocketComponent implements MessageComponentInterface { /** * Do handshake, frame/unframe messages coming/going in stack + * {@inheritdoc} */ public function onMessage(ConnectionInterface $from, $msg) { if (true !== $from->WebSocket->handshake) { @@ -92,6 +93,7 @@ class WebSocketComponent implements MessageComponentInterface { if (count($agreed_protocols) > 0) { $response->setHeader('Sec-WebSocket-Protocol', implode(',', $agreed_protocols)); } + $response->setHeader('X-Powered-By', \Ratchet\Resource\VERSION); $header = (string)$response; $comp = $this->_factory->newComposite(); diff --git a/src/Ratchet/Resource/ConnectionInterface.php b/src/Ratchet/Resource/ConnectionInterface.php index 93dd516..e754de8 100644 --- a/src/Ratchet/Resource/ConnectionInterface.php +++ b/src/Ratchet/Resource/ConnectionInterface.php @@ -1,5 +1,7 @@