Skip to content

fix: normalize HTTPRoute header and query matches - #4597

Merged
programmer04 merged 2 commits into
mainfrom
tao12345666333/httproute-match-normalization
Jun 16, 2026
Merged

fix: normalize HTTPRoute header and query matches#4597
programmer04 merged 2 commits into
mainfrom
tao12345666333/httproute-match-normalization

Conversation

@tao12345666333

@tao12345666333 tao12345666333 commented Jun 12, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

According to the semantics of the Gateway API, header names should be case insensitive.

https://gateway-api.sigs.k8s.io/reference/api-spec/1.5/spec/#httpheadermatch

Name is the name of the HTTP Header to be matched. Name matching MUST be
case-insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
If multiple entries specify equivalent header names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, “foo” and “Foo” are considered
equivalent.

Which issue this PR fixes

Fixes #4598

Special notes for your reviewer:

I actually discovered this issue while handling #4563. I think it is relatively independent and can be addressed as a separate PR.

PR Readiness Checklist:

Complete these before marking the PR as ready to review:

  • the CHANGELOG.md release notes have been updated to reflect significant changes

@tao12345666333 tao12345666333 self-assigned this Jun 12, 2026
@tao12345666333
tao12345666333 marked this pull request as ready for review June 12, 2026 14:48
@tao12345666333
tao12345666333 requested a review from a team as a code owner June 12, 2026 14:48

@programmer04 programmer04 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be worth mentioning this in the changelog, wdyt?

@tao12345666333 tao12345666333 added this to the KO v2.3.x milestone Jun 12, 2026
@tao12345666333

Copy link
Copy Markdown
Member Author

@programmer04 Thank you! Added a82c7bb

programmer04
programmer04 previously approved these changes Jun 12, 2026
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@tao12345666333
tao12345666333 enabled auto-merge June 15, 2026 08:19
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@tao12345666333
tao12345666333 enabled auto-merge June 15, 2026 09:44
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@programmer04
programmer04 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@programmer04
programmer04 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 15, 2026
@tao12345666333
tao12345666333 enabled auto-merge June 16, 2026 07:58
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
@tao12345666333
tao12345666333 force-pushed the tao12345666333/httproute-match-normalization branch from d8bd076 to c83d91d Compare June 16, 2026 09:58
@tao12345666333
tao12345666333 added this pull request to the merge queue Jun 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2026
@programmer04
programmer04 added this pull request to the merge queue Jun 16, 2026
Merged via the queue into main with commit dbfdcaa Jun 16, 2026
61 checks passed
@programmer04
programmer04 deleted the tao12345666333/httproute-match-normalization branch June 16, 2026 11:38
@team-k8s-bot

Copy link
Copy Markdown
Collaborator

The backport to release/2.2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.2.x release/2.2.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.2.x
# Create a new branch
git switch --create backport-4597-to-release/2.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 dbfdcaac315c4b5949cc50b5cb2aa69b3caa38f4
# Push it to GitHub
git push --set-upstream origin backport-4597-to-release/2.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.2.x

Then, create a pull request where the base branch is release/2.2.x and the compare/head branch is backport-4597-to-release/2.2.x.

tao12345666333 added a commit that referenced this pull request Jun 22, 2026
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
(cherry picked from commit dbfdcaa)
tao12345666333 added a commit that referenced this pull request Jun 23, 2026
…4597) (#4653)

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align traditional HTTPRoute translation with HTTPRouteHeaderMatching semantics

3 participants