Skip to content

Commit

Permalink
Fix issue in getting current request through classmethod when served …
Browse files Browse the repository at this point in the history
…through a different ASGI server (#2760)
  • Loading branch information
Thirumalai committed Jun 14, 2023
1 parent af67801 commit 50117d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sanic/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ async def create(
instance.transport,
sanic_app,
)
request_class._current.set(instance.request)
instance.request.stream = instance # type: ignore
instance.request_body = True
instance.request.conn_info = ConnInfo(instance.transport)
Expand Down

0 comments on commit 50117d1

Please sign in to comment.