From d85cc0655714ee74233ccca018976ca510ef0706 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:31:04 +0800 Subject: [PATCH] x --- transport/http/codec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/http/codec.go b/transport/http/codec.go index ec643cf..0bfceec 100644 --- a/transport/http/codec.go +++ b/transport/http/codec.go @@ -87,6 +87,7 @@ func DefaultErrorEncoder(w http.ResponseWriter, r *http.Request, err error) { _, _ = w.Write(body) } func CodeForRequest(r *http.Request, name string) (encoding.Codec, bool) { + fmt.Println("is default", name) for _, accept := range r.Header[name] { a := httputil.ContentSubtype(accept) fmt.Println("aaa", name, a) @@ -95,6 +96,5 @@ func CodeForRequest(r *http.Request, name string) (encoding.Codec, bool) { return codec, true } } - fmt.Println("is default", name) return encoding.GetCodec("json"), false }