wsgi.py (603:a11b80dedc6b) wsgi.py (1400:cbd75efbfb74)
1def application(environ, start_response):
1def application(environ, start_response):
2 body = bytes(environ['wsgi.input'].__iter__())
2 body = []
3 content_length = 0
3
4
4 start_response('200', [('Content-Length', str(len(body)))])
5 return [body]
5 for l in environ['wsgi.input'].__iter__():
6 body.append(l)
7 content_length += len(l)
8
9 start_response(
10 '200',
11 [
12 ('Content-Length', str(content_length)),
13 ('X-Lines-Count', str(len(body))),
14 ],
15 )
16 return body