diff --git a/src/wsproto/handshake.py b/src/wsproto/handshake.py index 72af722..28b0d8c 100644 --- a/src/wsproto/handshake.py +++ b/src/wsproto/handshake.py @@ -286,7 +286,9 @@ def _accept(self, event: AcceptConnection) -> bytes: headers.append((b"Sec-WebSocket-Extensions", accepts)) response = h11.InformationalResponse( - status_code=101, headers=headers + event.extra_headers + status_code=101, + headers=headers + event.extra_headers, + reason=b"Switching Protocols", ) self._connection = Connection( ConnectionType.CLIENT if self.client else ConnectionType.SERVER,