summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/web_server/wsgi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 37ded29480..3f8141c5e2 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -369,6 +369,11 @@ static void wsgi_process_http_input(struct web_server_data *wdata,
iter = PyObject_GetIter(result);
Py_DECREF(result);
+ if (iter == NULL) {
+ DEBUG(0, ("wsgi application did not return iterable\n"));
+ return;
+ }
+
/* Now, iter over all the data returned */
while ((item = PyIter_Next(iter))) {