http2: using http2 implies SSL

This commit is contained in:
Thomas Kriechbaumer 2015-06-08 17:12:01 +02:00
parent 18a4456397
commit b7c8021407
2 changed files with 5 additions and 0 deletions

View File

@ -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):

View File

@ -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:/"])