From 21bafe1e1eb8f8114a55882aba0b9366970ecf75 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Tue, 23 Mar 2021 15:29:02 -0700 Subject: [PATCH] tornado: Drop unused command-line flags. These flags were put in place in the first commit that introduced Tornado (9afd63692f95c502edf67ee03beb186eca81559a) with unclear utility. Remove them, since they have never been documented, and do not have a clear need. --- zerver/management/commands/runtornado.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/zerver/management/commands/runtornado.py b/zerver/management/commands/runtornado.py index e583f11048..ad8ac08c0c 100644 --- a/zerver/management/commands/runtornado.py +++ b/zerver/management/commands/runtornado.py @@ -49,20 +49,6 @@ class Command(BaseCommand): "(use multiple ports to start multiple servers)", ) - parser.add_argument( - "--nokeepalive", - action="store_true", - dest="no_keep_alive", - help="Tells Tornado to NOT keep alive http connections.", - ) - - parser.add_argument( - "--noxheaders", - action="store_false", - dest="xheaders", - help="Tells Tornado to NOT override remote IP with X-Real-IP.", - ) - def handle(self, addrport: str, **options: bool) -> None: interactive_debug_listen() @@ -80,9 +66,6 @@ class Command(BaseCommand): if not addr: addr = "127.0.0.1" - xheaders = options.get("xheaders", True) - no_keep_alive = options.get("no_keep_alive", False) - if settings.DEBUG: logging.basicConfig( level=logging.INFO, format="%(asctime)s %(levelname)-8s %(message)s" @@ -115,9 +98,7 @@ class Command(BaseCommand): zulip_autoreload_start() # start tornado web server in single-threaded mode - http_server = httpserver.HTTPServer( - application, xheaders=xheaders, no_keep_alive=no_keep_alive - ) + http_server = httpserver.HTTPServer(application, xheaders=True) http_server.listen(port, address=addr) from zerver.tornado.ioloop_logging import logging_data