Skip to content

Commit 9df33e5

Browse files
robscottk8s-infra-cherrypick-robot
authored and
k8s-infra-cherrypick-robot
committed
Clarifying HTTPRoute exact match behavior
1 parent dfe12a7 commit 9df33e5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

apis/v1beta1/httproute_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,9 @@ type HTTPRouteRule struct {
273273
type PathMatchType string
274274

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

279281
// Matches based on a URL path prefix split by `/`. Matching is

conformance/tests/httproute-exact-path-matching.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ var HTTPExactPathMatching = suite.ConformanceTest{
6363
}, {
6464
Request: http.Request{Path: "/two/"},
6565
Response: http.Response{StatusCode: 404},
66+
}, {
67+
Request: http.Request{Path: "/Two"},
68+
Response: http.Response{StatusCode: 404},
6669
},
6770
}
6871

0 commit comments

Comments
 (0)