mirror of
https://github.com/frappe/gunicorn.git
synced 2026-07-01 10:11:30 +08:00
19 lines
444 B
Python
19 lines
444 B
Python
# Simple WSGI app for benchmarking
|
|
|
|
def application(environ, start_response):
|
|
"""Basic hello world response."""
|
|
path = environ.get('PATH_INFO', '/')
|
|
|
|
if path == '/large':
|
|
body = b'X' * 65536 # 64KB
|
|
else:
|
|
body = b'Hello, World!'
|
|
|
|
status = '200 OK'
|
|
headers = [
|
|
('Content-Type', 'text/plain'),
|
|
('Content-Length', str(len(body))),
|
|
]
|
|
start_response(status, headers)
|
|
return [body]
|