Skip to content

Commit cb1e01c

Browse files
fix: prefer exact key name match over canonical header form in condition lookup (#226)
getValuesByKey() currently tries http.CanonicalHeaderKey(name) before the raw name. Reverse the order so that exact name matches take precedence, falling back to canonical header form only when needed.
1 parent e3b26eb commit cb1e01c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

policy/condition/value.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import (
2828

2929
func getValuesByKey(m map[string][]string, key Key) []string {
3030
name := key.Name()
31-
if values, found := m[http.CanonicalHeaderKey(name)]; found {
31+
if values, found := m[name]; found {
3232
return values
3333
}
34-
return m[name]
34+
return m[http.CanonicalHeaderKey(name)]
3535
}
3636

3737
// Splits an incoming path into bucket and object components.

0 commit comments

Comments
 (0)