From: Ciro Scognamiglio <ciro.scognamiglio@cslash.net>
Date: Mon, 7 Jul 2014 10:27:56 +0000 (+0200)
Subject: fixed manifold proxy should return httpresponce object
X-Git-Tag: myslice-1.1~47^2~11
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=719ef968c41e86810a3d32d7ded726495427e37f;p=unfold.git

fixed manifold proxy should return httpresponce object
---

diff --git a/manifoldapi/manifoldproxy.py b/manifoldapi/manifoldproxy.py
index c16ffdee..99959aee 100644
--- a/manifoldapi/manifoldproxy.py
+++ b/manifoldapi/manifoldproxy.py
@@ -40,7 +40,7 @@ with the query passed using POST"""
     # format_out: how to serve the results
     if format != 'json':
         print "manifoldproxy.proxy: unexpected format %s -- exiting"%format
-        return
+        return HttpResponse ({"ret":0}, mimetype="application/json")
     try:
         # translate incoming POST request into a query object
         if debug: print 'manifoldproxy.proxy: request.POST',request.POST
@@ -84,6 +84,7 @@ with the query passed using POST"""
         print "** PROXY ERROR **",e
         import traceback
         traceback.print_exc()
+        return HttpResponse ({"ret":0}, mimetype="application/json")
 
 #################### 
 # see CSRF_FAILURE_VIEW in settings.py