Fix(adaptor): Fixed an issue where the adapter did not convert all (#1021)

values of the header successfully when converting the header.
This commit is contained in:
Juan Chan
2021-05-11 15:58:25 +08:00
committed by GitHub
parent 19fcd40863
commit b2f111bd98
+2 -2
View File
@@ -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 {