From 9a6d3c5775d945509c7c2cbec48be59757da42c3 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 28 Dec 2017 16:01:06 +0300 Subject: HTTP keep-alive connections support. --- src/nxt_python_wsgi.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/nxt_python_wsgi.c') 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)) { -- cgit