diff options
author | Oisin Canty <o.canty@f5.com> | 2021-05-20 13:02:45 +0000 |
---|---|---|
committer | Oisin Canty <o.canty@f5.com> | 2021-05-20 13:02:45 +0000 |
commit | f60389a782470e31dc555ab864784b536f2544ca (patch) | |
tree | a153c74dc96eb51906956d7add8bfff729b547d3 /src/python/nxt_python_wsgi.c | |
parent | 2f0cca2e2b48f3f96056bac14e216f1248f8d4a8 (diff) | |
download | unit-f60389a782470e31dc555ab864784b536f2544ca.tar.gz unit-f60389a782470e31dc555ab864784b536f2544ca.tar.bz2 |
Python: support for multiple targets.
Diffstat (limited to 'src/python/nxt_python_wsgi.c')
-rw-r--r-- | src/python/nxt_python_wsgi.c | 5 |
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); |