diff --git a/libpathod/pathoc_cmdline.py b/libpathod/pathoc_cmdline.py index fa30aa1e2..dcd75d117 100644 --- a/libpathod/pathoc_cmdline.py +++ b/libpathod/pathoc_cmdline.py @@ -198,6 +198,9 @@ def args_pathoc(argv, stdout=sys.stdout, stderr=sys.stderr): if args.http2_skip_connection_preface: args.use_http2 = True + if args.use_http2: + args.ssl = True + reqs = [] for r in args.requests: if os.path.isfile(r): diff --git a/test/test_pathoc_cmdline.py b/test/test_pathoc_cmdline.py index 03c838446..6c070aed9 100644 --- a/test/test_pathoc_cmdline.py +++ b/test/test_pathoc_cmdline.py @@ -31,9 +31,11 @@ def test_pathoc(perror): a = cmdline.args_pathoc(["pathoc", "foo.com", "get:/", "--http2"]) assert a.use_http2 == True + assert a.ssl == True a = cmdline.args_pathoc(["pathoc", "foo.com", "get:/", "--http2-skip-connection-preface"]) assert a.use_http2 == True + assert a.ssl == True assert a.http2_skip_connection_preface == True a = cmdline.args_pathoc(["pathoc", "-c", "foo", "foo.com:8888", "get:/"])