diff options
author | Juan Chan <xinyuchen77@gmail.com> | 2021-05-11 15:58:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 09:58:25 +0200 |
commit | b2f111bd987535e673df3172e34ec06fed46ae0f (patch) | |
tree | b02ed3fbe633ac017cf44ee204eb3c83df641b63 /fasthttpadaptor | |
parent | Fix chunked streaming (#1015) (diff) | |
download | fasthttp-b2f111bd987535e673df3172e34ec06fed46ae0f.tar.gz fasthttp-b2f111bd987535e673df3172e34ec06fed46ae0f.tar.bz2 fasthttp-b2f111bd987535e673df3172e34ec06fed46ae0f.zip |
Fix(adaptor): Fixed an issue where the adapter did not convert all (#1021)
values of the header successfully when converting the header.
Diffstat (limited to 'fasthttpadaptor')
-rw-r--r-- | fasthttpadaptor/adaptor.go | 4 |
1 files 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 { |