From db01d75facaf83368dd0e655b0c159bc1dc025f7 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Sun, 31 Mar 2013 14:02:10 -0400 Subject: [PATCH] [WebSocket] Fixed Hixie handshake bug (for real this time) refs #80 --- Version/Hixie76.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Version/Hixie76.php b/Version/Hixie76.php index ab34925..536977b 100644 --- a/Version/Hixie76.php +++ b/Version/Hixie76.php @@ -103,13 +103,7 @@ class Hixie76 implements VersionInterface { } public function generateKeyNumber($key) { - if (0 === substr_count($key, ' ')) { - return ''; - } - - $int = (int)preg_replace('[\D]', '', $key) / substr_count($key, ' '); - - return (is_int($int)) ? $int : ''; + return preg_replace('[\D]', '', $key) / substr_count($key, ' '); } protected function sign($key1, $key2, $code) {