From b2f111bd987535e673df3172e34ec06fed46ae0f Mon Sep 17 00:00:00 2001 From: Juan Chan Date: Tue, 11 May 2021 15:58:25 +0800 Subject: [PATCH] Fix(adaptor): Fixed an issue where the adapter did not convert all (#1021) values of the header successfully when converting the header. --- fasthttpadaptor/adaptor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fasthttpadaptor/adaptor.go b/fasthttpadaptor/adaptor.go index 54d222e..e7a4ffe 100644 --- a/fasthttpadaptor/adaptor.go +++ b/fasthttpadaptor/adaptor.go @@ -68,7 +68,7 @@ func NewFastHTTPHandler(h http.Handler) fasthttp.RequestHandler { case "Transfer-Encoding": r.TransferEncoding = append(r.TransferEncoding, sv) default: - hdr.Set(sk, sv) + hdr.Add(sk, sv) } }) r.Header = hdr @@ -92,7 +92,7 @@ func NewFastHTTPHandler(h http.Handler) fasthttp.RequestHandler { } for _, v := range vv { - ctx.Response.Header.Set(k, v) + ctx.Response.Header.Add(k, v) } } if !haveContentType {