on master help sign in
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

commit7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e authorLuc Didry <luc@didry.org> dateSun 15 Mar 2015, 20:07 (12 years ago) parent22c4195
1 file changed+4
searx/webapp.py+4
searx/webapp.py+4
@@ -687,6 +687,10 @@ Disallow: /preferences
687687@app.route('/opensearch.xml', methods=['GET'])
688688def opensearch():
689689 method = 'post'
690+
691+ if request.cookies.get('method', 'POST') == 'GET':
692+ method = 'get'
693+
690694 # chrome/chromium only supports HTTP GET....
691695 if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
692696 method = 'get'