Change scope, defensive
This commit is contained in:
parent
1e828bf7d4
commit
4095a7ed6e
@ -14,7 +14,7 @@ class ClientNegotiator {
|
|||||||
/**
|
/**
|
||||||
* @var \Psr\Http\Message\RequestInterface
|
* @var \Psr\Http\Message\RequestInterface
|
||||||
*/
|
*/
|
||||||
public $defaultHeader;
|
private $defaultHeader;
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->verifier = new ResponseVerifier;
|
$this->verifier = new ResponseVerifier;
|
||||||
@ -29,7 +29,6 @@ class ClientNegotiator {
|
|||||||
|
|
||||||
public function generateRequest(UriInterface $uri) {
|
public function generateRequest(UriInterface $uri) {
|
||||||
return $this->defaultHeader->withUri($uri)
|
return $this->defaultHeader->withUri($uri)
|
||||||
->withoutHeader("Sec-WebSocket-Key")
|
|
||||||
->withHeader("Sec-WebSocket-Key", $this->generateKey());
|
->withHeader("Sec-WebSocket-Key", $this->generateKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user