If the gRPC-Go server is crashing, please do file an issue under the 
grpc-go repository.

For the issue where the python client is not setting the appropriate 
content-type, please file an issue there.

Thanks

On Tuesday, February 16, 2021 at 3:27:13 AM UTC-8 Mustafa Khalil wrote:

> Good afternoon, 
>
>  Hope you are all doing well.
>  I am trying to implement the code generators for the grpc flatbuffers 
> library, however i am facing an issue. I have been testing the currnent 
> implementation that are implemented in the flatbuffers library and 
> upgrading them to support the latest gRPC v1.35.0. The issue comes to light 
> whenever i try to call a grpc-go server from any other implementation, the 
> grpc-go server requires a `content-type` header of type 
> `application/grpc+flatbuffers` which makes sense. However whenever i try to 
> set that content-type from any other client the client ignores the set 
> header and defaults to `application/grpc` which crashes the go gRPC server 
> since the server is expecting a header with `+flatbuffers` in it for it to 
> decode and encode the data properly. How should we solve this so we can 
> include the support of flatbuffers into grpc, which some languages have 
> integrated properly with (swift, ts, python).
>
> Is this an issue that should be reported in the `grpc/grpc-go` repository 
> or the main repository? and if so what would be the solution for this 
> instance, since according to the 
> https://github.com/grpc/grpc/blob/v1.35.0/doc/PROTOCOL-HTTP2.md 
> documentation we can set a custom suffix `Content-Type → "content-type" 
> "application/grpc" [("+proto" / "+json" / {custom})]`
>
> example: Go lang to Go lang
>
> ```
> :method POST
> :scheme http 
> :path /models.Greeter/SayHello 
> :authority localhost:3000 
> content-type application/grpc+flatbuffers 
> user-agent grpc-go/1.35.0 te trailers grpc-timeout 9997779u
> ```
>  As you can see if its being called from go lang it doesn't have issues 
> however when I call the server from the python client it clearly doesn't 
> append the +flatbuffers suffix
>
> python to Go lang
>
> ```
>
> :scheme http 
>
> :method POST
> :authority localhost:3000 
> :path /models.Greeter/SayHello 
> te trailers 
> content-type application/grpc 
> user-agent grpc-python/1.35.0 grpc-c/14.0.0 (osx; chttp2)
> ```
>
> i've tried this as a solution `with_call(hello_request, 
> metadata=[('content-type', 'application/grpc+flatbuffers')])`. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/f51eb077-81e9-4a46-b938-8712d8523780n%40googlegroups.com.

Reply via email to