From 0c0c2736a727fbe5e65e0eb4d0a5f78ba1f58239 Mon Sep 17 00:00:00 2001 From: "roberto@debian32" Date: Fri, 17 Jun 2011 17:54:49 +0200 Subject: [PATCH] maintain a constant mapping in vhost mode --- plugins/python/pyloader.c | 2 +- utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index 33120dd1..55830921 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -50,7 +50,7 @@ int init_uwsgi_app(int loader, void *arg1, struct wsgi_request *wsgi_req, PyThre } - if (uwsgi.vhost && wsgi_req->host_len > 0) { + if (uwsgi.vhost) { mountpoint = uwsgi_concat3n(wsgi_req->host, wsgi_req->host_len, "|", 1, wsgi_req->script_name, wsgi_req->script_name_len); } else { diff --git a/utils.c b/utils.c index 261bfa5c..aeb150fd 100644 --- a/utils.c +++ b/utils.c @@ -1238,7 +1238,7 @@ int uwsgi_get_app_id(char *script_name, int script_name_len, int modifier1) { #ifdef UWSGI_DEBUG uwsgi_log("searching for %.*s in %.*s %p\n", script_name_len, script_name, uwsgi.apps[i].mountpoint_len, uwsgi.apps[i].mountpoint, uwsgi.apps[i].callable); #endif - if (!uwsgi.apps[i].mountpoint_len) { + if (!uwsgi.apps[i].callable) { continue; } if (!uwsgi_strncmp(uwsgi.apps[i].mountpoint, uwsgi.apps[i].mountpoint_len, script_name, script_name_len)) {