prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Only a lower case "ip" displays the IP address
  When the feature is enabled to show a user's IP address when "ip" is entered into the search bar, it only does so when it is all lowercase. Querying "IP" does not return an IP. This seems like a bug, apologies if this was intended.
  
  Thanks
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `searx/plugins/self_info.py`
  Content:
  ```
  1 '''
  2 searx is free software: you can redistribute it and/or modify
  3 it under the terms of the GNU Affero General Public License as published by
  4 the Free Software Foundation, either version 3 of the License, or
  5 (at your option) any later version.
  6 
  7 searx is distributed in the hope that it will be useful,
  8 but WITHOUT ANY WARRANTY; without even the implied warranty of
  9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10 GNU Affero General Public License for more details.
  11 
  12 You should have received a copy of the GNU Affero General Public License
  13 along with searx. If not, see < http://www.gnu.org/licenses/ >.
  14 
  15 (C) 2015 by Adam Tauber, <asciimoo@gmail.com>
  16 '''
  17 from flask_babel import gettext
  18 import re
  19 name = gettext('Self Informations')
  20 description = gettext('Displays your IP if the query is "ip" and your user agent if the query contains "user agent".')
  21 default_on = True
  22 
  23 
  24 # Self User Agent regex
  25 p = re.compile('.*user[ -]agent.*', re.IGNORECASE)
  26 
  27 
  28 # attach callback to the post search hook
  29 #  request: flask request object
  30 #  ctx: the whole local context of the pre search hook
  31 def post_search(request, search):
  32     if search.search_query.pageno > 1:
  33         return True
  34     if search.search_query.query == 'ip':
  35         x_forwarded_for = request.headers.getlist("X-Forwarded-For")
  36         if x_forwarded_for:
  37             ip = x_forwarded_for[0]
  38         else:
  39             ip = request.remote_addr
  40         search.result_container.answers['ip'] = {'answer': ip}
  41     elif p.match(search.search_query.query):
  42         ua = request.user_agent
  43         search.result_container.answers['user-agent'] = {'answer': ua}
  44     return True
  45
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py
  --- a/searx/plugins/self_info.py
  +++ b/searx/plugins/self_info.py
  @@ -31,7 +31,7 @@
   def post_search(request, search):
       if search.search_query.pageno > 1:
           return True
  -    if search.search_query.query == 'ip':
  +    if search.search_query.query.lower() == 'ip':
           x_forwarded_for = request.headers.getlist("X-Forwarded-For")
           if x_forwarded_for:
               ip = x_forwarded_for[0]
  
verification_info: {"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -31,7 +31,7 @@\n def post_search(request, search):\n     if search.search_query.pageno > 1:\n         return True\n-    if search.search_query.query == 'ip':\n+    if search.search_query.query.lower() == 'ip':\n         x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n         if x_forwarded_for:\n             ip = x_forwarded_for[0]\n", "issue": "Only a lower case \"ip\" displays the IP address\nWhen the feature is enabled to show a user's IP address when \"ip\" is entered into the search bar, it only does so when it is all lowercase. Querying \"IP\" does not return an IP. This seems like a bug, apologies if this was intended.\r\n\r\nThanks\n", "before_files": [{"content": "'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with searx. If not, see < http://www.gnu.org/licenses/ >.\n\n(C) 2015 by Adam Tauber, <asciimoo@gmail.com>\n'''\nfrom flask_babel import gettext\nimport re\nname = gettext('Self Informations')\ndescription = gettext('Displays your IP if the query is \"ip\" and your user agent if the query contains \"user agent\".')\ndefault_on = True\n\n\n# Self User Agent regex\np = re.compile('.*user[ -]agent.*', re.IGNORECASE)\n\n\n# attach callback to the post search hook\n#  request: flask request object\n#  ctx: the whole local context of the pre search hook\ndef post_search(request, search):\n    if search.search_query.pageno > 1:\n        return True\n    if search.search_query.query == 'ip':\n        x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n        if x_forwarded_for:\n            ip = x_forwarded_for[0]\n        else:\n            ip = request.remote_addr\n        search.result_container.answers['ip'] = {'answer': ip}\n    elif p.match(search.search_query.query):\n        ua = request.user_agent\n        search.result_container.answers['user-agent'] = {'answer': ua}\n    return True\n", "path": "searx/plugins/self_info.py"}], "after_files": [{"content": "'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with searx. If not, see < http://www.gnu.org/licenses/ >.\n\n(C) 2015 by Adam Tauber, <asciimoo@gmail.com>\n'''\nfrom flask_babel import gettext\nimport re\nname = gettext('Self Informations')\ndescription = gettext('Displays your IP if the query is \"ip\" and your user agent if the query contains \"user agent\".')\ndefault_on = True\n\n\n# Self User Agent regex\np = re.compile('.*user[ -]agent.*', re.IGNORECASE)\n\n\n# attach callback to the post search hook\n#  request: flask request object\n#  ctx: the whole local context of the pre search hook\ndef post_search(request, search):\n    if search.search_query.pageno > 1:\n        return True\n    if search.search_query.query.lower() == 'ip':\n        x_forwarded_for = request.headers.getlist(\"X-Forwarded-For\")\n        if x_forwarded_for:\n            ip = x_forwarded_for[0]\n        else:\n            ip = request.remote_addr\n        search.result_container.answers['ip'] = {'answer': ip}\n    elif p.match(search.search_query.query):\n        ua = request.user_agent\n        search.result_container.answers['user-agent'] = {'answer': ua}\n    return True\n", "path": "searx/plugins/self_info.py"}]}