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
86e2484dfe
commit
cb6f580d02
@ -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