support Grpc-Timeout header, export default content type

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-03-21 13:03:48 +03:00
parent f00e34380b
commit 48bce4ed2f
2 changed files with 28 additions and 8 deletions

View File

@@ -122,8 +122,8 @@ func (g *grpcServer) createSubHandler(sb *subscriber, opts server.Options) broke
ct := msg.Header["Content-Type"]
if len(ct) == 0 {
msg.Header["Content-Type"] = defaultContentType
ct = defaultContentType
msg.Header["Content-Type"] = DefaultContentType
ct = DefaultContentType
}
cf, err := g.newCodec(ct)
if err != nil {