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

Force the NPN/ALPN protocol with the Hyper command-line client. #228

Merged
merged 2 commits into from
Apr 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hyper/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def make_troubleshooting_argument(parser):
help='Show debugging information (loglevel=DEBUG)')
parser.add_argument(
'--h2', action='store_true', default=False,
help="Do HTTP/2 directly in plaintext: skip plaintext upgrade")
help="Do HTTP/2 directly, skipping plaintext upgrade and ignoring "
"NPN/ALPN."
)


def split_host_and_port(hostname):
Expand Down Expand Up @@ -236,7 +238,10 @@ def request(args):
)
else: # pragma: no cover
conn = HTTP20Connection(
args.url.host, args.url.port, secure=args.url.secure
args.url.host,
args.url.port,
secure=args.url.secure,
force_proto='h2'
)

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