mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
parent
97a45805f8
commit
fe7632fe37
@ -24,8 +24,7 @@ def app(environ, start_response):
|
|||||||
response_headers = [
|
response_headers = [
|
||||||
('Content-type', 'text/plain'),
|
('Content-type', 'text/plain'),
|
||||||
('Content-Length', str(len(data))),
|
('Content-Length', str(len(data))),
|
||||||
('X-Gunicorn-Version', __version__),
|
('X-Gunicorn-Version', __version__)
|
||||||
("Test", "test тест"),
|
|
||||||
]
|
]
|
||||||
start_response(status, response_headers)
|
start_response(status, response_headers)
|
||||||
return iter([data])
|
return iter([data])
|
||||||
|
|||||||
@ -13,4 +13,4 @@ def app(environ, start_response):
|
|||||||
log.info("Hello Info!")
|
log.info("Hello Info!")
|
||||||
log.warn("Hello Warn!")
|
log.warn("Hello Warn!")
|
||||||
log.error("Hello Error!")
|
log.error("Hello Error!")
|
||||||
return ["Hello World!\n"]
|
return [b"Hello World!\n"]
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
#
|
#
|
||||||
# Launch a server with the app in a terminal
|
# Launch a server with the app in a terminal
|
||||||
#
|
#
|
||||||
# $ gunicorn -w3 readline:app
|
# $ gunicorn -w3 readline_app:app
|
||||||
#
|
#
|
||||||
# Then in another terminal launch the following command:
|
# Then in another terminal launch the following command:
|
||||||
#
|
#
|
||||||
@ -27,8 +27,7 @@ def app(environ, start_response):
|
|||||||
response_headers = [
|
response_headers = [
|
||||||
('Content-type', 'text/plain'),
|
('Content-type', 'text/plain'),
|
||||||
('Transfer-Encoding', "chunked"),
|
('Transfer-Encoding', "chunked"),
|
||||||
('X-Gunicorn-Version', __version__),
|
('X-Gunicorn-Version', __version__)
|
||||||
#("Test", "test тест"),
|
|
||||||
]
|
]
|
||||||
start_response(status, response_headers)
|
start_response(status, response_headers)
|
||||||
|
|
||||||
@ -42,4 +41,4 @@ def app(environ, start_response):
|
|||||||
print(line)
|
print(line)
|
||||||
lines.append(line)
|
lines.append(line)
|
||||||
|
|
||||||
return iter(lines)
|
return iter(lines)
|
||||||
@ -20,8 +20,7 @@ def app(environ, start_response):
|
|||||||
response_headers = [
|
response_headers = [
|
||||||
('Content-type', 'text/plain'),
|
('Content-type', 'text/plain'),
|
||||||
('Content-Length', str(len(data))),
|
('Content-Length', str(len(data))),
|
||||||
('X-Gunicorn-Version', __version__),
|
('X-Gunicorn-Version', __version__)
|
||||||
#("Test", "test тест"),
|
|
||||||
]
|
]
|
||||||
start_response(status, response_headers)
|
start_response(status, response_headers)
|
||||||
return iter([data])
|
return iter([data])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user