summaryrefslogtreecommitdiffhomepage
path: root/src/python/nxt_python_wsgi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/nxt_python_wsgi.c')
-rw-r--r--src/python/nxt_python_wsgi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/python/nxt_python_wsgi.c b/src/python/nxt_python_wsgi.c
index 77c45af5..b80d10fa 100644
--- a/src/python/nxt_python_wsgi.c
+++ b/src/python/nxt_python_wsgi.c
@@ -302,7 +302,7 @@ nxt_python_request_handler(nxt_unit_request_info_t *req)
{
int rc;
PyObject *environ, *args, *response, *iterator, *item;
- PyObject *close, *result;
+ PyObject *close, *result, *application;
nxt_bool_t prepare_environ;
nxt_python_ctx_t *pctx;
@@ -348,7 +348,8 @@ nxt_python_request_handler(nxt_unit_request_info_t *req)
Py_INCREF(pctx->start_resp);
PyTuple_SET_ITEM(args, 1, pctx->start_resp);
- response = PyObject_CallObject(nxt_py_application, args);
+ application = nxt_py_targets->target[req->request->app_target].application;
+ response = PyObject_CallObject(application, args);
Py_DECREF(args);