diff --git a/Guzzle/Http/Message/RequestFactory.php b/Guzzle/Http/Message/RequestFactory.php deleted file mode 100644 index c1f6b45..0000000 --- a/Guzzle/Http/Message/RequestFactory.php +++ /dev/null @@ -1,17 +0,0 @@ -entityEnclosingRequestClass; - $request = new $c($method, $url, $headers); - $request->setBody(EntityBody::factory($body)); - - return $request; - } -} \ No newline at end of file diff --git a/HttpRequestParser.php b/HttpRequestParser.php deleted file mode 100644 index 0922ef7..0000000 --- a/HttpRequestParser.php +++ /dev/null @@ -1,56 +0,0 @@ -httpBuffer)) { - $context->httpBuffer = ''; - } - - $context->httpBuffer .= $data; - - if (strlen($context->httpBuffer) > (int)$this->maxSize) { - throw new \OverflowException("Maximum buffer size of {$this->maxSize} exceeded parsing HTTP header"); - } - - if ($this->isEom($context->httpBuffer)) { - $request = RequestFactory::getInstance()->fromMessage($context->httpBuffer); - - unset($context->httpBuffer); - - return $request; - } - } - - /** - * Determine if the message has been buffered as per the HTTP specification - * @param string $message - * @return boolean - */ - public function isEom($message) { - return (boolean)strpos($message, static::EOM); - } -} \ No newline at end of file diff --git a/WsServer.php b/WsServer.php index e766d1b..6329cf9 100644 --- a/WsServer.php +++ b/WsServer.php @@ -2,12 +2,11 @@ namespace Ratchet\WebSocket; use Ratchet\MessageComponentInterface; use Ratchet\ConnectionInterface; +use Ratchet\Http\HttpServerInterface; +use Guzzle\Http\Message\RequestInterface; +use Guzzle\Http\Message\Response; use Ratchet\WebSocket\Version; use Ratchet\WebSocket\Encoding\ToggleableValidator; -use Guzzle\Http\Message\Response; - -use Guzzle\Http\Message\RequestInterface; -use Ratchet\Http\HttpServerInterface; /** * The adapter to handle WebSocket requests/responses @@ -16,13 +15,6 @@ use Ratchet\Http\HttpServerInterface; * @link http://dev.w3.org/html5/websockets/ */ class WsServer implements HttpServerInterface { - /** - * Buffers incoming HTTP requests returning a Guzzle Request when coalesced - * @var HttpRequestParser - * @note May not expose this in the future, may do through facade methods - */ - public $reqParser; - /** * Manage the various WebSocket versions to support * @var VersionManager @@ -65,7 +57,6 @@ class WsServer implements HttpServerInterface { * If you want to enable sub-protocols have your component implement WsServerInterface as well */ public function __construct(MessageComponentInterface $component) { - $this->reqParser = new HttpRequestParser; $this->versioner = new VersionManager; $this->validator = new ToggleableValidator;