diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-10-23 21:45:00 +0200 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-10-23 21:45:00 +0200 |
| commit | 52516dab97143c83bd4e0226a960daf22fdc0031 (patch) | |
| tree | 9e852e1d0a1903e8d707d9cad56a79792c8c3923 /searx/webapp.py | |
| parent | 5e358ea9a9c3c5d9c90530892639d1fe82cfb40f (diff) | |
[enh] valid json content type
Diffstat (limited to 'searx/webapp.py')
| -rw-r--r-- | searx/webapp.py | 2 |
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') |