From 7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e Mon Sep 17 00:00:00 2001 From: Luc Didry Date: Sun, 15 Mar 2015 20:07:50 +0100 Subject: [PATCH] Fixes #271 The opensearch method is now the method set in the preferences. As before, POST by default and GET for Chrome/Chromium which doesn't handle POST --- searx/webapp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/searx/webapp.py b/searx/webapp.py index 6e7c8e7da..6a5387122 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -687,6 +687,10 @@ Disallow: /preferences @app.route('/opensearch.xml', methods=['GET']) def opensearch(): method = 'post' + + if request.cookies.get('method', 'POST') == 'GET': + method = 'get' + # chrome/chromium only supports HTTP GET.... if request.headers.get('User-Agent', '').lower().find('webkit') >= 0: method = 'get'