From aff33ea8969a477e9e02ef4be00872685ba1ca72 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 10 Jan 2015 15:27:42 +0100 Subject: [PATCH] [fix] autocompleter error handling --- searx/webapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 93af05083..f0a1eeb2f 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -343,14 +343,14 @@ def autocompleter(): # check if search query is set if not query.getSearchQuery(): - return + return '', 400 # run autocompleter completer = autocomplete_backends.get(request.cookies.get('autocomplete')) # check if valid autocompleter is selected if not completer: - return + return '', 400 # run autocompletion raw_results = completer(query.getSearchQuery())