Skip to content

Commit

Permalink
Added "sockjs_transport_name" into request object.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cykooz committed Jul 10, 2023
1 parent 6850a48 commit cb90f5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sockjs/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from typing import Iterable, List, Optional, Type

from aiohttp import hdrs, web
from aiohttp.web_request import Request


try:
Expand Down Expand Up @@ -189,7 +190,7 @@ def __init__(
transport_names - self.disable_transports
)

async def handler(self, request):
async def handler(self, request: Request):
info = request.match_info

# lookup transport
Expand All @@ -212,6 +213,7 @@ async def handler(self, request):
except KeyError:
raise web.HTTPNotFound(headers=session_cookie(request))

request["sockjs_transport_name"] = transport_class.name
transport = transport_class(manager, session, request)
try:
return await transport.process()
Expand Down

0 comments on commit cb90f5d

Please sign in to comment.