on master help sign in
[enh] valid json content type
commit52516dab97143c83bd4e0226a960daf22fdc0031 authorasciimoo <asciimoo@gmail.com> dateWed 23 Oct 2013, 21:45 (13 years ago) parent5e358ea
1 file changed+1−1
searx/webapp.py+1−1
searx/webapp.py+1−1
@@ -82,7 +82,7 @@ def index():
8282 results = search(query, request, selected_categories)
8383 if request_data.get('format') == 'json':
8484 # TODO HTTP headers
85− return json.dumps({'query': query, 'results': results})
85+ return Response(json.dumps({'query': query, 'results': results}), mimetype='application/json')
8686 template = render('results.html'
8787 ,results=results
8888 ,q=query.decode('utf-8')