Skip to content

Commit e50e569

Browse files
committed
Pass factory into the server negotiator
1 parent 8ace7ec commit e50e569

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/WebSocket/Middleware/EstablishWebSocketConnection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use BabDev\WebSocket\Server\WebSocket\Exception\InvalidEncoding;
1111
use BabDev\WebSocket\Server\WebSocket\WebSocketConnectionContext;
1212
use BabDev\WebSocket\Server\WebSocketServerMiddleware;
13+
use GuzzleHttp\Psr7\HttpFactory;
1314
use GuzzleHttp\Psr7\Message;
1415
use Psr\Http\Message\RequestInterface;
1516
use Ratchet\RFC6455\Handshake\NegotiatorInterface;
@@ -43,7 +44,7 @@ final class EstablishWebSocketConnection implements ServerMiddleware
4344
*/
4445
public function __construct(
4546
private readonly ServerMiddleware $middleware,
46-
private readonly NegotiatorInterface $negotiator = new ServerNegotiator(new RequestVerifier()),
47+
private readonly NegotiatorInterface $negotiator = new ServerNegotiator(new RequestVerifier(), new HttpFactory()),
4748
) {
4849
if ('e29c93' !== bin2hex('')) {
4950
throw new InvalidEncoding('Invalid encoding, ensure the UTF-8 charset is active.');

0 commit comments

Comments
 (0)