grpc-hw
grpc-hw copied to clipboard
grpc-http-same-port example works (due to vendor/) but no longer matches upstream
Upstream discussion: soheilhy/cmux#64, grpc/grpc-go#2406 If you read through the cmux comments you'll see mention of a java workaround (https://github.com/soheilhy/cmux/issues/64#issuecomment-461982271), which is now needed for go as well.
Changing one line in server/main.go should do it:
- grpcListener := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
+ grpcListener := m.MatchWithWriters(cmux.HTTP2MatchHeaderFieldSendSettings("content-type", "application/grpc"))
@mpictor that works, thank you for taking the time to post it.