From f4cb3c67c1404c45a99f911206e593be23be0069 Mon Sep 17 00:00:00 2001 From: "roberto@oneiric64" Date: Sun, 5 Feb 2012 11:56:50 +0100 Subject: [PATCH] a series of stupid fixes --- plugins/cgi/cgi_plugin.c | 2 +- plugins/python/wsgi_handlers.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/cgi/cgi_plugin.c b/plugins/cgi/cgi_plugin.c index 4ae43dc2..707a9e96 100644 --- a/plugins/cgi/cgi_plugin.c +++ b/plugins/cgi/cgi_plugin.c @@ -19,7 +19,7 @@ struct uwsgi_cgi { void uwsgi_opt_add_cgi(char *opt, char *value, void *foobar) { - char *val = strchr(optarg, '='); + char *val = strchr(value, '='); if (!val) { uwsgi_dyn_dict_new(&uc.mountpoint, value, strlen(value), NULL, 0); } diff --git a/plugins/python/wsgi_handlers.c b/plugins/python/wsgi_handlers.c index f8f5f322..4df9f36c 100644 --- a/plugins/python/wsgi_handlers.c +++ b/plugins/python/wsgi_handlers.c @@ -519,6 +519,7 @@ void uwsgi_after_request_wsgi(struct wsgi_request *wsgi_req) { if (uwsgi.workers[uwsgi.mywid].harakiri > 0) set_harakiri(0); } + UWSGI_GET_GIL PyObject *arh = python_call(up.after_req_hook, up.after_req_hook_args, 0, NULL); if (!arh) { PyErr_Print(); @@ -527,6 +528,7 @@ void uwsgi_after_request_wsgi(struct wsgi_request *wsgi_req) { Py_DECREF(arh); } PyErr_Clear(); + UWSGI_RELEASE_GIL } if (uwsgi.shared->options[UWSGI_OPTION_LOGGING] || wsgi_req->log_this) {