minor content-type fixes
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
668e034041
commit
8eeab44898
6
grpc.go
6
grpc.go
@ -259,7 +259,7 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) (err err
|
||||
// timeout for server deadline
|
||||
to, ok := md.Get("timeout")
|
||||
if ok {
|
||||
md.Del("x-content-type")
|
||||
md.Del("timeout")
|
||||
}
|
||||
|
||||
// get content type
|
||||
@ -549,6 +549,10 @@ func (g *grpcServer) newCodec(ct string) (codec.Codec, error) {
|
||||
g.RLock()
|
||||
defer g.RUnlock()
|
||||
|
||||
if idx := strings.IndexRune(ct, ';'); idx >= 0 {
|
||||
ct = ct[:idx]
|
||||
}
|
||||
|
||||
if c, ok := g.opts.Codecs[ct]; ok {
|
||||
return c, nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user