Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 2c7e6d3

Browse files
committed
Force the protocol when forcing HTTP/2.
This allows the --h2 flag to work with TLS connections too.
1 parent 11e0f2a commit 2c7e6d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hyper/cli.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ def request(args):
236236
)
237237
else: # pragma: no cover
238238
conn = HTTP20Connection(
239-
args.url.host, args.url.port, secure=args.url.secure
239+
args.url.host,
240+
args.url.port,
241+
secure=args.url.secure,
242+
force_proto='h2'
240243
)
241244

242245
conn.request(args.method, args.url.path, args.body, args.headers)

0 commit comments

Comments
 (0)