Skip to content

Commit

Permalink
Merge pull request #2055 from robscott/clarify-exact-match
Browse files Browse the repository at this point in the history
Clarifying HTTPRoute exact match behavior
  • Loading branch information
k8s-ci-robot committed May 23, 2023
2 parents 6e3ff74 + 237c49a commit 4738c6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apis/v1beta1/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ type HTTPRouteRule struct {
type PathMatchType string

const (
// Matches the URL path exactly and with case sensitivity.
// Matches the URL path exactly and with case sensitivity. This means that
// an exact path match on `/abc` will only match requests to `/abc`, NOT
// `/abc/`, `/Abc`, or `/abcd`.
PathMatchExact PathMatchType = "Exact"

// Matches based on a URL path prefix split by `/`. Matching is
Expand Down
3 changes: 3 additions & 0 deletions conformance/tests/httproute-exact-path-matching.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ var HTTPExactPathMatching = suite.ConformanceTest{
}, {
Request: http.Request{Path: "/two/"},
Response: http.Response{StatusCode: 404},
}, {
Request: http.Request{Path: "/Two"},
Response: http.Response{StatusCode: 404},
},
}

Expand Down

0 comments on commit 4738c6c

Please sign in to comment.