@property
def routes(self) -> typing.List[BaseRoute]:
- return getattr(self.app, "routes", None)
+ return getattr(self.app, "routes", [])
def matches(self, scope: Scope) -> typing.Tuple[Match, Scope]:
if scope["type"] in ("http", "websocket"):
@property
def routes(self) -> typing.List[BaseRoute]:
- return getattr(self.app, "routes", None)
+ return getattr(self.app, "routes", [])
def matches(self, scope: Scope) -> typing.Tuple[Match, Scope]:
if scope["type"] in ("http", "websocket"):
for key, value in request.headers.items()
]
+ scope: typing.Dict[str, typing.Any]
+
if scheme in {"ws", "wss"}:
subprotocol = request.headers.get("sec-websocket-protocol", None)
if subprotocol is None: