Fix logic for header copying.

This commit is contained in:
Kavin 2022-05-18 13:32:39 +01:00
parent 4c74225413
commit 4aa7d3ee73
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -209,7 +209,7 @@ outer:
continue outer
}
}
if (name != "Content-Length" || length) && strings.HasPrefix(name, "Access-Control") {
if (name != "Content-Length" || length) && !strings.HasPrefix(name, "Access-Control") {
// Loop over all values for the name.
for _, value := range values {
to.Set(name, value)