summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-10-23 21:45:00 +0200
committerasciimoo <asciimoo@gmail.com>2013-10-23 21:45:00 +0200
commit52516dab97143c83bd4e0226a960daf22fdc0031 (patch)
tree9e852e1d0a1903e8d707d9cad56a79792c8c3923 /searx/webapp.py
parent5e358ea9a9c3c5d9c90530892639d1fe82cfb40f (diff)
[enh] valid json content type
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index b64d6a466..f16f602b3 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -82,7 +82,7 @@ def index():
results = search(query, request, selected_categories)
if request_data.get('format') == 'json':
# TODO HTTP headers
- return json.dumps({'query': query, 'results': results})
+ return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')
template = render('results.html'
,results=results
,q=query.decode('utf-8')