soheilhy / cmux

Connection multiplexer for GoLang: serve different services on the same port!
Apache License 2.0
2.57k stars 196 forks source link

Fix java gRPC client #24

Closed soheilhy closed 8 years ago

tamird commented 8 years ago

Late to this party, but is this really safe? In the case where the framer settings used by cmux differ from the ones used by the grpc server, you are lying to the client.

soheilhy commented 8 years ago

Yeah, according to the spec, the latest SETTINGS will override any values from previous SETTINGS frame(s). So, it should be safe to lie: https://http2.github.io/http2-spec/#SETTINGS

But, the best place to fix this is really inside gRPC's Java client.

soheilhy commented 8 years ago

Oh, @tamird I think you misunderstood this patch. This does not affect existing matchers. Unless one uses m.MatchWithWriters(HTTP2MatchHeaderFieldSendSettings(...)), any other write from a normal matcher is discarded and it's not sent to the client.