From dec2b234f871d524979fd6d91d0c3782f37de5fe Mon Sep 17 00:00:00 2001 From: Unbit Date: Tue, 12 Nov 2013 12:14:15 +0100 Subject: [PATCH] fixed no default app --- core/utils.c | 6 ++++-- plugins/python/pyloader.c | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/core/utils.c b/core/utils.c index 5aefd856..dbdf9919 100644 --- a/core/utils.c +++ b/core/utils.c @@ -3353,8 +3353,10 @@ struct uwsgi_app *uwsgi_add_app(int id, uint8_t modifier1, char *mountpoint, int } } - if ((mountpoint_len == 0 || (mountpoint_len = -1 && mountpoint[0] == '/')) && uwsgi.default_app == -1) { - uwsgi.default_app = id; + if (!uwsgi.no_default_app) { + if ((mountpoint_len == 0 || (mountpoint_len = -1 && mountpoint[0] == '/')) && uwsgi.default_app == -1) { + uwsgi.default_app = id; + } } return wi; diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index 1053f3ff..fb5ac404 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -340,9 +340,11 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre const char *default_app = ""; - if ((wsgi_req->appid_len == 0 || (wsgi_req->appid_len = 1 && wsgi_req->appid[0] == '/')) && uwsgi.default_app == -1) { - default_app = " (default app)" ; - uwsgi.default_app = id; + if (!uwsgi.no_default_app) { + if ((wsgi_req->appid_len == 0 || (wsgi_req->appid_len = 1 && wsgi_req->appid[0] == '/')) && uwsgi.default_app == -1) { + default_app = " (default app)" ; + uwsgi.default_app = id; + } } wi->started_at = now;