aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-16 16:57:02 -0800
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-11-16 16:57:02 -0800
commit265b1035f44b690c79cb2932ce27510c3595eda7 (patch)
treeb78930d414713f106aa90ed79a8189a97c138dd5
parent8e0230b75693a111d6c368cbcf4b98d6c667f3e8 (diff)
downloadbun-265b1035f44b690c79cb2932ce27510c3595eda7.tar.gz
bun-265b1035f44b690c79cb2932ce27510c3595eda7.tar.zst
bun-265b1035f44b690c79cb2932ce27510c3595eda7.zip
[router] Fix case sensitivity bug with route params
-rw-r--r--src/router.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/router.zig b/src/router.zig
index d61624984..2f29c545c 100644
--- a/src/router.zig
+++ b/src/router.zig
@@ -194,7 +194,7 @@ pub const Routes = struct {
const name = this.dynamic_match_names[i];
const case_sensitive_name_without_leading_slash = this.dynamic_names[i][1..];
var offset: u32 = 0;
- if (Pattern.match(path, name, case_sensitive_name_without_leading_slash, allocator, *@TypeOf(ctx.params), &ctx.params, true)) {
+ if (Pattern.match(path, case_sensitive_name_without_leading_slash, name, allocator, *@TypeOf(ctx.params), &ctx.params, true)) {
return this.dynamic[i];
}
}
@@ -512,7 +512,7 @@ pub const Route = struct {
table['['] = 252;
table[']'] = 253;
// of each segment
- table['/'] = 251;
+ table['/'] = 254;
break :brk table;
};