Guzzle 3.6 conformance
Updated inheritance class to match API change Use new Guzzle Header class when searching for values Lock Ratchet into using Guzzle 3.6 to future-proof
This commit is contained in:
parent
b93581cdcd
commit
b21b2007c5
@ -27,7 +27,7 @@
|
|||||||
, "require": {
|
, "require": {
|
||||||
"php": ">=5.3.3"
|
"php": ">=5.3.3"
|
||||||
, "react/socket": "0.2.*"
|
, "react/socket": "0.2.*"
|
||||||
, "guzzle/http": "~3.0"
|
, "guzzle/http": "3.6.*"
|
||||||
, "symfony/http-foundation": "~2.1"
|
, "symfony/http-foundation": "~2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
30
composer.lock
generated
30
composer.lock
generated
@ -3,7 +3,7 @@
|
|||||||
"This file locks the dependencies of your project to a known state",
|
"This file locks the dependencies of your project to a known state",
|
||||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||||
],
|
],
|
||||||
"hash": "9ccce99ef687cb79dad8a4c581f38cc5",
|
"hash": "b5fee3d5d9c4f60b01030a234d8673f5",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "evenement/evenement",
|
"name": "evenement/evenement",
|
||||||
@ -375,17 +375,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v2.2.1",
|
"version": "v2.3.0",
|
||||||
"target-dir": "Symfony/Component/EventDispatcher",
|
"target-dir": "Symfony/Component/EventDispatcher",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||||
"reference": "v2.2.1"
|
"reference": "v2.3.0-RC1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.2.1",
|
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/v2.3.0-RC1",
|
||||||
"reference": "v2.2.1",
|
"reference": "v2.3.0-RC1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -395,13 +395,13 @@
|
|||||||
"symfony/dependency-injection": ">=2.0,<3.0"
|
"symfony/dependency-injection": ">=2.0,<3.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/dependency-injection": "2.2.*",
|
"symfony/dependency-injection": "",
|
||||||
"symfony/http-kernel": "2.2.*"
|
"symfony/http-kernel": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.2-dev"
|
"dev-master": "2.3-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -425,21 +425,21 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony EventDispatcher Component",
|
"description": "Symfony EventDispatcher Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-02-11 11:26:43"
|
"time": "2013-05-13 14:36:40"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v2.2.1",
|
"version": "v2.3.0",
|
||||||
"target-dir": "Symfony/Component/HttpFoundation",
|
"target-dir": "Symfony/Component/HttpFoundation",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||||
"reference": "v2.2.1"
|
"reference": "v2.3.0-RC1"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.2.1",
|
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/v2.3.0-RC1",
|
||||||
"reference": "v2.2.1",
|
"reference": "v2.3.0-RC1",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -448,7 +448,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "2.2-dev"
|
"dev-master": "2.3-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -475,7 +475,7 @@
|
|||||||
],
|
],
|
||||||
"description": "Symfony HttpFoundation Component",
|
"description": "Symfony HttpFoundation Component",
|
||||||
"homepage": "http://symfony.com",
|
"homepage": "http://symfony.com",
|
||||||
"time": "2013-04-06 10:15:43"
|
"time": "2013-05-10 06:00:03"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
@ -7,7 +7,7 @@ class RequestFactory extends GuzzleRequestFactory {
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function create($method, $url, $headers = null, $body = '') {
|
public function create($method, $url, $headers = null, $body = '', array $options = array()) {
|
||||||
$c = $this->entityEnclosingRequestClass;
|
$c = $this->entityEnclosingRequestClass;
|
||||||
$request = new $c($method, $url, $headers);
|
$request = new $c($method, $url, $headers);
|
||||||
$request->setBody(EntityBody::factory($body));
|
$request->setBody(EntityBody::factory($body));
|
||||||
|
@ -117,9 +117,10 @@ class WsServer implements MessageComponentInterface {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This needs to be refactored later on, incorporated with routing
|
if (null !== ($subHeader = $from->WebSocket->request->getHeader('Sec-WebSocket-Protocol'))) {
|
||||||
if ('' !== ($agreedSubProtocols = $this->getSubProtocolString($from->WebSocket->request->getTokenizedHeader('Sec-WebSocket-Protocol', ',')))) {
|
if ('' !== ($agreedSubProtocols = $this->getSubProtocolString($subHeader->normalize()))) {
|
||||||
$response->setHeader('Sec-WebSocket-Protocol', $agreedSubProtocols);
|
$response->setHeader('Sec-WebSocket-Protocol', $agreedSubProtocols);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$response->setHeader('X-Powered-By', \Ratchet\VERSION);
|
$response->setHeader('X-Powered-By', \Ratchet\VERSION);
|
||||||
|
Loading…
Reference in New Issue
Block a user