From ac660017feeb9f2c7c6b18c246362483693f6594 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Tue, 12 Jun 2012 20:49:05 -0400 Subject: [PATCH] CS --- HandshakeNegotiator.php | 7 +------ Version/RFC6455.php | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/HandshakeNegotiator.php b/HandshakeNegotiator.php index 1b80b13..07eac1e 100644 --- a/HandshakeNegotiator.php +++ b/HandshakeNegotiator.php @@ -115,12 +115,7 @@ class HandshakeNegotiator implements MessageInterface { public function disableVersion($versionId) { unset($this->versions[$versionId]); - $this->versionString = ''; - - foreach ($this->versions as $id => $object) { - $this->versionString .= "{$id}, "; - } - $this->versionString = substr($this->versionString, 0, -2); + $this->versionString = implode(',', array_keys($this->versions)); return $this; } diff --git a/Version/RFC6455.php b/Version/RFC6455.php index 2f06de8..f734042 100644 --- a/Version/RFC6455.php +++ b/Version/RFC6455.php @@ -172,6 +172,6 @@ class RFC6455 implements VersionInterface { * @internal */ public function sign($key) { - return base64_encode(sha1($key . static::GUID, 1)); + return base64_encode(sha1($key . static::GUID, true)); } } \ No newline at end of file