commit: 7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e
parent 22c4195c89d99b90e4b1885aaa9cc1323ec8ea4f
Author: Luc Didry <luc@didry.org>
Date: Sun, 15 Mar 2015 20:07:50 +0100
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
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git 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'