Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/asgi_server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env python3

import asyncio
import os
import sys

Expand Down Expand Up @@ -67,7 +68,7 @@ async def app(scope, receive, send):
return

assert scope['type'] == 'http'
loop = scope['state']['server']['loop']
loop = asyncio.get_event_loop()

more_body = True

Expand Down
5 changes: 0 additions & 5 deletions tremolo/asgi_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ async def request_received(self, request, response):
'state': self.options['state'].copy()
}

# provide direct access to server objects
self.server['request'] = request
self.server['response'] = response
scope['state']['server'] = self.server

if (self.options['ws'] and b'sec-websocket-key' in request.headers and
b'upgrade' in request.headers and
request.headers[b'upgrade'][0].lower() == b'websocket'):
Expand Down
Loading