diff options
author | Luc Didry <luc@didry.org> | 2015-03-15 20:07:50 +0100 |
---|---|---|
committer | Luc Didry <luc@didry.org> | 2015-03-15 20:07:50 +0100 |
commit | 7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e (patch) | |
tree | fa293371519b7185afc5bd18daa3e8d7f3fa4e41 /searx/webapp.py | |
parent | 22c4195c89d99b90e4b1885aaa9cc1323ec8ea4f (diff) | |
download | searxng-7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e.tar.gz searxng-7004de6aa77dd57b5c71df8373ce19f8e3b1bc9e.zip |
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 (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 4 |
1 files changed, 4 insertions, 0 deletions
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' |