From 52516dab97143c83bd4e0226a960daf22fdc0031 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Wed, 23 Oct 2013 21:45:00 +0200 Subject: [PATCH] [enh] valid json content type --- searx/webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index b64d6a46..f16f602b 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')