diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index 4de94836..c2e5f537 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -10,6 +10,7 @@ extern struct uwsgi_server uwsgi; extern struct uwsgi_python up; +extern struct uwsgi_plugin python_plugin; extern char **environ; @@ -94,6 +95,7 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre wi = &uwsgi_apps[id]; memset(wi, 0, sizeof(struct uwsgi_app)); + wi->modifier1 = python_plugin.modifier1; wi->mountpoint_len = wsgi_req->appid_len < 0xff ? wsgi_req->appid_len : (0xff-1); strncpy(wi->mountpoint, wsgi_req->appid, wi->mountpoint_len); diff --git a/plugins/python/web3_subhandler.c b/plugins/python/web3_subhandler.c index 2009ada9..231a538d 100644 --- a/plugins/python/web3_subhandler.c +++ b/plugins/python/web3_subhandler.c @@ -2,6 +2,7 @@ extern struct uwsgi_server uwsgi; extern struct uwsgi_python up; +extern struct uwsgi_plugin python_plugin; extern PyTypeObject uwsgi_InputType; void *uwsgi_request_subhandler_web3(struct wsgi_request *wsgi_req, struct uwsgi_app *wi) { @@ -29,7 +30,7 @@ void *uwsgi_request_subhandler_web3(struct wsgi_request *wsgi_req, struct uwsgi_ } if (wsgi_req->uh->modifier1 == UWSGI_MODIFIER_MANAGE_PATH_INFO) { - wsgi_req->uh->modifier1 = 0; + wsgi_req->uh->modifier1 = python_plugin.modifier1; pydictkey = PyDict_GetItemString(wsgi_req->async_environ, "SCRIPT_NAME"); if (pydictkey) { if (PyString_Check(pydictkey)) { diff --git a/plugins/python/wsgi_subhandler.c b/plugins/python/wsgi_subhandler.c index c7b2da6f..15a1b918 100644 --- a/plugins/python/wsgi_subhandler.c +++ b/plugins/python/wsgi_subhandler.c @@ -2,6 +2,7 @@ extern struct uwsgi_server uwsgi; extern struct uwsgi_python up; +extern struct uwsgi_plugin python_plugin; extern PyTypeObject uwsgi_InputType; /* @@ -71,7 +72,7 @@ void *uwsgi_request_subhandler_wsgi(struct wsgi_request *wsgi_req, struct uwsgi_ } if (wsgi_req->uh->modifier1 == UWSGI_MODIFIER_MANAGE_PATH_INFO) { - wsgi_req->uh->modifier1 = 0; + wsgi_req->uh->modifier1 = python_plugin.modifier1; pydictkey = PyDict_GetItemString(wsgi_req->async_environ, "SCRIPT_NAME"); if (pydictkey) { if (PyString_Check(pydictkey)) {