Allowed module routes to return static file responses.

This commit is contained in:
2026-02-15 09:15:01 -05:00
parent 067b7c5a0a
commit d55bc2a762
4 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -330,7 +330,7 @@ class RouteDispatcher:
"""
return self._route_registry.unregister_by_module(module_name)
async def dispatch(self, request: web.Request) -> web.Response:
async def dispatch(self, request: web.Request) -> web.StreamResponse:
"""
Dispatch an HTTP request to the appropriate module route handler.
@@ -371,7 +371,7 @@ class RouteDispatcher:
request: web.Request,
route_info: RouteInfo,
match_info: dict[str, str] | None = None,
) -> web.Response:
) -> web.StreamResponse:
"""
Handle an HTTP request to a module-registered route.
@@ -418,7 +418,7 @@ class RouteDispatcher:
if result is None:
return web.Response(status=204) # No Content.
elif isinstance(result, web.Response):
elif isinstance(result, web.StreamResponse):
return result
elif isinstance(result, dict):
return web.json_response(result)