From fcf1efdaa5e6626cd39da0f5d6880fd47a76d5de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=9F=E4=B9=90?= Date: Tue, 14 Mar 2023 14:17:57 +0800 Subject: [PATCH] x --- transport/http/codec.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transport/http/codec.go b/transport/http/codec.go index dac6808..4013bca 100644 --- a/transport/http/codec.go +++ b/transport/http/codec.go @@ -87,8 +87,9 @@ func DefaultErrorEncoder(w http.ResponseWriter, r *http.Request, err error) { } func CodeForRequest(r *http.Request, name string) (encoding.Codec, bool) { for _, accept := range r.Header[name] { - fmt.Println(accept) - codec := encoding.GetCodec(httputil.ContentSubtype(accept)) + a := httputil.ContentSubtype(accept) + fmt.Println("aaa", a) + codec := encoding.GetCodec(a) if codec != nil { return codec, true }