grpcurl/cmd
Yusuke KUOKA d37571c559 Allow passing :authority pseudo header
So that you inform reverse proxy servers to use it for routing.
Tested with nginx/1.13.12, which is the latest release of nginx as of today.

Usage: `grpcurl --authority example.com localhost`

See https://github.com/grpc/grpc-go/pull/1064 for the PR to grpc-go which enabled this feature.
See https://tools.ietf.org/html/rfc7540#section-8.1.2.3 and https://tools.ietf.org/html/rfc3986#section-3.2 for what is a valid :authority header value.

Note that `grpcurl -H ':authority: example.com' localhost` doesn't work in two ways.

One is that the current implementation of grpcurl splits `:authority: example.com` to `[]string{"", "authority: example}` and considers it as a header with an empty key and a value of "authority: example.com" which isn't valid.

Another one is that `-H` passes request metadata, whereas `:authority` header must be provided at connection time.
2018-05-24 22:27:07 +09:00
..
grpcurl Allow passing :authority pseudo header 2018-05-24 22:27:07 +09:00
testserver grpclog.Printf deprecated; use Info instead 2018-05-08 10:08:35 -04:00