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

Commit

Permalink
Merge pull request #228 from Lukasa/cli-fix
Browse files Browse the repository at this point in the history
Force the NPN/ALPN protocol with the Hyper command-line client.
  • Loading branch information
Lukasa committed Apr 20, 2016
2 parents 11e0f2a + 784e57b commit 065b539
Showing 1 changed file with 7 additions and 2 deletions.
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

0 comments on commit 065b539

Please sign in to comment.