grpc-hw icon indicating copy to clipboard operation
grpc-hw copied to clipboard

grpc-http-same-port example works (due to vendor/) but no longer matches upstream

Open mpictor opened this issue 5 years ago • 1 comments

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 avatar Feb 26 '20 18:02 mpictor

@mpictor that works, thank you for taking the time to post it.

geoah avatar Jun 30 '20 13:06 geoah