You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When yab makes grpc server reflection call, the :authority header is empty in the request.
As per HTTP2 spec, :authority header must not be empty if present.
Clients that generate HTTP/2 requests directly MUST use the ":authority" pseudo-header field to convey authority information, unless there is no authority information to convey (in which case it MUST NOT generate ":authority").
Repro step:
Make a grpc request without proto binary and yab makes a grpc server reflection call to service
Record request via wireshark or tcpdump and ":authority" header is empty.
This was discovered while testing yab against envoy proxy. Envoy has strict HTTP2 checks and it complains about invalid header.
{"application":"envoy","caller":"source/common/http/http2/codec_impl.cc:1250","callerFunction":"onError","message":"invalid http2: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [:authority], value: []","level":"debug","pid":"34","threadId":"95","timestamp":"2024-12-17T09:09:21.490623000","ConnectionId":"10"}
{"application":"envoy","caller":"source/common/http/http2/codec_impl.cc:1256","callerFunction":"onInvalidFrame","message":"invalid frame: Invalid HTTP header field was received on stream 1","level":"debug","pid":"34","threadId":"95","timestamp":"2024-12-17T09:09:21.490744000","ConnectionId":"10"}
Yab uses github.com/jhump/protoreflect, which uses a normal grpc client in turn. Moreover, afaik, grpc skips ":authority" header if client tries to set it.
But let's hope it's fixed in a new versions (as both libs are pretty outdated here). Once we upgraded protoreflect in monorepo (one of the near future tasks, internal reference: RPC-2400), we'll upgrade it and grpc-go in yab, and then double check if the problem is solved.
grpc provides grpc.WithAuthority(string) option to pass authority to grpc client via DialContext or NewClient.
Also it's not auto fixed in the new version. I locally upgraded all and it still has the empty authority header.
It should be unrelated to upgrade in internal monorepo since yab is entirely separate repo.
More people have stumped upon this in past as well. See #307
When yab makes grpc server reflection call, the
:authority
header is empty in the request.As per HTTP2 spec,
:authority
header must not be empty if present.Repro step:
This was discovered while testing yab against envoy proxy. Envoy has strict HTTP2 checks and it complains about invalid header.
Captured request:

Hex dump
The text was updated successfully, but these errors were encountered: