diff --git a/src/Ratchet/Wamp/WampConnection.php b/src/Ratchet/Wamp/WampConnection.php index 64590a0..3b8f93e 100644 --- a/src/Ratchet/Wamp/WampConnection.php +++ b/src/Ratchet/Wamp/WampConnection.php @@ -82,14 +82,12 @@ class WampConnection extends AbstractConnectionDecorator { */ public function getUri($uri) { $curieSeperator = ':'; - $fullSeperator = '#'; if (preg_match('/http(s*)\:\/\//', $uri) == false) { - if (strpos($uri, $curieSeperator) !== false) { + if (strpos($uri, $curieSeperator) !== false && isset($this->WAMP->prefixes[$prefix]) === true) { list($prefix, $action) = explode($curieSeperator, $uri); - $expandedPrefix = isset($this->WAMP->prefixes[$prefix]) ? $this->WAMP->prefixes[$prefix] : $prefix; - return $expandedPrefix . $fullSeperator . $action; + return $this->WAMP->prefixes[$prefix] . '#' . $action; } }