Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
Revert "run-dev: Abbreviate error message when receiving an https request."
Anders Kaseorg94f8ec0658da
diff --git a/tools/run-dev b/tools/run-devindex 5b61e4c193b..87eb1f59cbc 100755--- a/tools/run-dev+++ b/tools/run-dev@@ -24,7 +24,6 @@ from urllib.parse import urlsplitimport aiohttpimport aiohttp.web_fileresponsefrom aiohttp import hdrs, web-from aiohttp.http_exceptions import BadStatusLinefrom scripts.lib.zulip_tools import CYAN, ENDCfrom tools.lib.test_script import add_provision_check_override_param, assert_provisioning_status_ok@@ -439,27 +438,6 @@ def print_listeners(external_host_url: str) -> None:print()-def https_log_filter(record: logging.LogRecord) -> bool:- # aiohttp emits an exception with a traceback when receiving an- # https request (https://github.com/aio-libs/aiohttp/issues/8065).- # Abbreviate it to a one-line message.- if (- record.exc_info is not None- and isinstance(error := record.exc_info[1], BadStatusLine)- and error.message.startswith(- (- "Invalid method encountered:\n\n b'\\x16",- 'Invalid method encountered:\n\n b"\\x16',- )- )- ):- record.msg = "Rejected https request (this development server only supports http)"- record.exc_info = None- return True---logging.getLogger("aiohttp.server").addFilter(https_log_filter)-runner: web.AppRunnerchildren: list["subprocess.Popen[bytes]"] = []