Skip to content

Commit

Permalink
use realpath() for document_root
Browse files Browse the repository at this point in the history
  • Loading branch information
roberto@longshot committed Apr 5, 2011
1 parent b0db67d commit d4f23cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugins/python/pyloader.c
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion uwsgi.c
Expand Up @@ -2483,7 +2483,7 @@ uwsgi.shared->hooks[UWSGI_MODIFIER_PING] = uwsgi_request_ping; //100
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);
Expand Down

0 comments on commit d4f23cc

Please sign in to comment.