From 652a9c582543b0b5bdb693e3fc7bbd5f401e3b15 Mon Sep 17 00:00:00 2001 From: "roberto@sirius" Date: Mon, 22 Nov 2010 11:15:02 +0100 Subject: [PATCH] various multiapp and virtualhosting fixes --- config2.ru | 7 ++++++ multi.xml | 45 +++++++++++++++++++++++++++++++++++++++ plugins/python/pyloader.c | 2 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 config2.ru create mode 100644 multi.xml diff --git a/config2.ru b/config2.ru new file mode 100644 index 00000000..f07832cf --- /dev/null +++ b/config2.ru @@ -0,0 +1,7 @@ +require 'sinatra' + +get '/hi' do + "Hello World" +end + +run Sinatra::Application diff --git a/multi.xml b/multi.xml new file mode 100644 index 00000000..183d2f5b --- /dev/null +++ b/multi.xml @@ -0,0 +1,45 @@ + + + rack + + :9090 + + + + + 4 + + + + + TRAC_ENV=utrac + + + + werkzeug.testapp:test_app + + + + trac.web.main:dispatch_request + + + + werkzeug.testapp:test_app + + + + +from bzrlib.transport.http import wsgi +application = wsgi.make_app("mybzr", "/bzr", readonly=False) + + + + + trac.web.main:dispatch_request + + + + config2.ru + + + diff --git a/plugins/python/pyloader.c b/plugins/python/pyloader.c index d97a6955..4339cd28 100644 --- a/plugins/python/pyloader.c +++ b/plugins/python/pyloader.c @@ -532,11 +532,11 @@ PyObject *uwsgi_eval_loader(void *arg1) { wsgi_eval_callable = PyDict_GetItemString(up.loader_dict, up.callable); } else { + wsgi_eval_callable = PyDict_GetItemString(up.loader_dict, "application"); } if (wsgi_eval_callable) { - uwsgi_log( "found the \"%s\" callable\n", up.callable); if (!PyFunction_Check(wsgi_eval_callable) && !PyCallable_Check(wsgi_eval_callable)) { uwsgi_log( "you must define a callable object in your code\n"); exit(1);