[WebSocket] Fixed Hixie handshake bug (for real this time)

refs #80
This commit is contained in:
Chris Boden 2013-03-31 14:02:10 -04:00
parent 777e928cea
commit db01d75fac

View File

@ -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) {