diff --git a/core/protocol.c b/core/protocol.c index 1211085e..e56ccc30 100644 --- a/core/protocol.c +++ b/core/protocol.c @@ -715,7 +715,7 @@ next: } if (uwsgi.manage_script_name) { - if (uwsgi_apps_cnt > 0 && wsgi_req->path_info_len > 1 && wsgi_req->path_info_pos != -1) { + if (uwsgi_apps_cnt > 0 && wsgi_req->path_info_len >= 1 && wsgi_req->path_info_pos != -1) { // starts with 1 as the 0 app is the default (/) one int best_found = 0; char *orig_path_info = wsgi_req->path_info; diff --git a/core/uwsgi.c b/core/uwsgi.c index 77f58e67..0bbaf7d3 100755 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -3857,8 +3857,8 @@ void uwsgi_init_all_apps() { what++; for (j = 0; j < 256; j++) { if (uwsgi.p[j]->mount_app) { - uwsgi_log("mounting %s on %s\n", what, app_mps->value); - if (uwsgi.p[j]->mount_app(app_mps->value, what) != -1) + uwsgi_log("mounting %s on %s\n", what, app_mps->value[0] == 0 ? "/" : app_mps->value); + if (uwsgi.p[j]->mount_app(app_mps->value[0] == 0 ? "/" : app_mps->value, what) != -1) break; } }