Commit 24fb53f
committed
bug #62459 [Routing] Fix case sensitivity for static host matching in compiled routes (yoeunes)
This PR was merged into the 6.4 branch.
Discussion
----------
[Routing] Fix case sensitivity for static host matching in compiled routes
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | -
| License | MIT
`CompiledUrlMatcher` uses string comparison for static hosts, but checks lowercased request host against the original route host. This fails if the route host has uppercase letters (e.g., `'api.example.com' !== 'API.example.com'`), throwing `ResourceNotFoundException`.
`UrlMatcher` avoids this via case-insensitive regex.
This PR lowercases static hosts in `CompiledUrlMatcherDumper` for consistency.
Commits
-------
9c33b1fdb6b [Routing] Fix case sensitivity for static host matching in compiled routesFile tree
2 files changed
+28
-1
lines changed- Matcher/Dumper
- Tests/Matcher
2 files changed
+28
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
21 | 43 | | |
22 | 44 | | |
23 | 45 | | |
| |||
0 commit comments