Tests: style.
This commit is contained in:
@@ -8,15 +8,12 @@ async def application(scope, receive, send):
|
||||
if not m.get('more_body', False):
|
||||
break
|
||||
|
||||
await send({
|
||||
'type': 'http.response.start',
|
||||
'status': 200,
|
||||
'headers': [
|
||||
(b'content-length', str(len(body)).encode()),
|
||||
]
|
||||
})
|
||||
await send(
|
||||
{
|
||||
'type': 'http.response.start',
|
||||
'status': 200,
|
||||
'headers': [(b'content-length', str(len(body)).encode())],
|
||||
}
|
||||
)
|
||||
|
||||
await send({
|
||||
'type': 'http.response.body',
|
||||
'body': body,
|
||||
})
|
||||
await send({'type': 'http.response.body', 'body': body})
|
||||
|
||||
@@ -3,7 +3,5 @@ def application(environ, start_response):
|
||||
content_length = int(environ.get('CONTENT_LENGTH', 0))
|
||||
body = bytes(environ['wsgi.input'].read(content_length))
|
||||
|
||||
start_response('200', [
|
||||
('Content-Length', str(len(body)))
|
||||
])
|
||||
start_response('200', [('Content-Length', str(len(body)))])
|
||||
return [body]
|
||||
|
||||
Reference in New Issue
Block a user