diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index 75760de7..99c03919 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -439,6 +439,7 @@ PyObject *uwsgi_uwsgi_loader(void *arg1) { if (quick_callable[strlen(quick_callable) -2 ] == '(' && quick_callable[strlen(quick_callable) -1] ==')') { quick_callable[strlen(quick_callable) -2 ] = 0; tmp_callable = PyDict_GetItemString(wsgi_dict, quick_callable); + quick_callable[strlen(quick_callable) -2 ] = '('; if (tmp_callable) { return python_call(tmp_callable, PyTuple_New(0), 0); } diff --git a/uwsgi.c b/uwsgi.c index 53247dc4..60d39f92 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -2483,7 +2483,7 @@ end: usm->mountpoint = optarg; usm->mountpoint_len = docroot-usm->mountpoint; - usm->document_root = docroot+1; + usm->document_root = realpath(docroot+1, NULL); usm->document_root_len = strlen(usm->document_root); uwsgi_log("static-mapped %.*s to %.*s\n", usm->mountpoint_len, usm->mountpoint, usm->document_root_len, usm->document_root);