From 8c2f4c1899694a552e22a44d6194feb2fb451f5e Mon Sep 17 00:00:00 2001 From: gongluck <1039994845@qq.com> Date: Sat, 16 Dec 2023 14:37:35 +0800 Subject: [PATCH] Fixed #3771 (#3788) --- gateway/internal/requestparser.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/internal/requestparser.go b/gateway/internal/requestparser.go index f239c0a8..0a355979 100644 --- a/gateway/internal/requestparser.go +++ b/gateway/internal/requestparser.go @@ -34,7 +34,7 @@ func NewRequestParser(r *http.Request, resolver jsonpb.AnyResolver) (grpcurl.Req } m := make(map[string]any) - if err := json.NewDecoder(body).Decode(&m); err != nil { + if err := json.NewDecoder(body).Decode(&m); err != nil && err != io.EOF { return nil, err }