summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_python_wsgi.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-12-28 16:01:06 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-12-28 16:01:06 +0300
commit9a6d3c5775d945509c7c2cbec48be59757da42c3 (patch)
tree7129c13d6027a45e1a324deab373125bd7a14794 /src/nxt_python_wsgi.c
parent497faf1b9abb188cab40c389a9e6221add5dd496 (diff)
downloadunit-9a6d3c5775d945509c7c2cbec48be59757da42c3.tar.gz
unit-9a6d3c5775d945509c7c2cbec48be59757da42c3.tar.bz2
HTTP keep-alive connections support.
Diffstat (limited to 'src/nxt_python_wsgi.c')
-rw-r--r--src/nxt_python_wsgi.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/nxt_python_wsgi.c b/src/nxt_python_wsgi.c
index 0f56ea37..ae0a60d9 100644
--- a/src/nxt_python_wsgi.c
+++ b/src/nxt_python_wsgi.c
@@ -775,11 +775,7 @@ nxt_py_start_resp(PyObject *self, PyObject *args)
nxt_uint_t i, n;
nxt_python_run_ctx_t *ctx;
- static const u_char resp[] = "HTTP/1.1 ";
-
- static const u_char default_headers[]
- = "Server: unit/" NXT_VERSION "\r\n"
- "Connection: close\r\n";
+ static const u_char status[] = "Status: ";
static const u_char cr_lf[] = "\r\n";
static const u_char sc_sp[] = ": ";
@@ -794,7 +790,7 @@ nxt_py_start_resp(PyObject *self, PyObject *args)
ctx = nxt_python_run_ctx;
- nxt_python_write(ctx, resp, sizeof(resp) - 1, 0, 0);
+ nxt_python_write(ctx, status, sizeof(status) - 1, 0, 0);
rc = nxt_python_write_py_str(ctx, string, 0, 0);
if (nxt_slow_path(rc != NXT_OK)) {
@@ -804,8 +800,6 @@ nxt_py_start_resp(PyObject *self, PyObject *args)
nxt_python_write(ctx, cr_lf, sizeof(cr_lf) - 1, 0, 0);
- nxt_python_write(ctx, default_headers, sizeof(default_headers) - 1, 0, 0);
-
headers = PyTuple_GET_ITEM(args, 1);
if (!PyList_Check(headers)) {