Bläddra i källkod

Merge pull request #274 from ldidry/fix-271

Fixes #271
Adam Tauber 10 år sedan
förälder
incheckning
b8e9f5105c
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4
    0
      searx/webapp.py

+ 4
- 0
searx/webapp.py Visa fil

687
 @app.route('/opensearch.xml', methods=['GET'])
687
 @app.route('/opensearch.xml', methods=['GET'])
688
 def opensearch():
688
 def opensearch():
689
     method = 'post'
689
     method = 'post'
690
+
691
+    if request.cookies.get('method', 'POST') == 'GET':
692
+        method = 'get'
693
+
690
     # chrome/chromium only supports HTTP GET....
694
     # chrome/chromium only supports HTTP GET....
691
     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
695
     if request.headers.get('User-Agent', '').lower().find('webkit') >= 0:
692
         method = 'get'
696
         method = 'get'