reverseproxy: Sync changes from stdlib for 1xx handling (#6656)

* reverseproxy: Sync changes from stdlib for 1xx handling

Sourced from https://github.com/golang/go/commit/960654be0c4ad7918376e2e1d47491c9bc7520e0

* Use clear()

https://github.com/golang/go/commit/3bc28402fae2a1646e4d2756344b5eb34994d25f
This commit is contained in:
Francis Lavoie
2024-10-22 14:10:46 -04:00
committed by GitHub
parent 5e6024c48d
commit fbf0f4c425
2 changed files with 22 additions and 8 deletions
+1 -3
View File
@@ -200,9 +200,7 @@ func (ops HeaderOps) ApplyTo(hdr http.Header, repl *caddy.Replacer) {
for _, fieldName := range ops.Delete {
fieldName = repl.ReplaceKnown(fieldName, "")
if fieldName == "*" {
for existingField := range hdr {
delete(hdr, existingField)
}
clear(hdr)
}
}