Skip to content

fix: prefer exact key name match over canonical header form in condition lookup#226

Open
harshavardhana wants to merge 1 commit intominio:mainfrom
harshavardhana:fix-condition-key-lookup-order
Open

fix: prefer exact key name match over canonical header form in condition lookup#226
harshavardhana wants to merge 1 commit intominio:mainfrom
harshavardhana:fix-condition-key-lookup-order

Conversation

@harshavardhana
Copy link
Member

Summary

  • Reverse lookup order in getValuesByKey() to try exact key name match before http.CanonicalHeaderKey form
  • Exact names set by the server take precedence, canonical header form is used as fallback

Test plan

  • go test ./policy/condition/... passes (72 tests)

…ion lookup

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant