From 45c44fb8410a96e3893114ec20323a3db5972e98 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Thu, 26 Apr 2012 20:05:53 -0400 Subject: [PATCH] Branding --- src/Ratchet/Component/WAMP/WAMPServerComponent.php | 2 +- src/Ratchet/Component/WebSocket/WebSocketComponent.php | 2 ++ src/Ratchet/Resource/ConnectionInterface.php | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) 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 @@