Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mpictor opened this issue Feb 26, 2020 · 1 comment

Comments

@mpictor
Copy link

mpictor commented Feb 26, 2020

Upstream discussion: soheilhy/cmux#64, grpc/grpc-go#2406
If you read through the cmux comments you'll see mention of a java workaround (soheilhy/cmux#64 (comment)), 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"))
@geoah
Copy link

geoah commented Jun 30, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants