diff options
author | 2021-11-16 16:57:02 -0800 | |
---|---|---|
committer | 2021-11-16 16:57:02 -0800 | |
commit | 265b1035f44b690c79cb2932ce27510c3595eda7 (patch) | |
tree | b78930d414713f106aa90ed79a8189a97c138dd5 | |
parent | 8e0230b75693a111d6c368cbcf4b98d6c667f3e8 (diff) | |
download | bun-265b1035f44b690c79cb2932ce27510c3595eda7.tar.gz bun-265b1035f44b690c79cb2932ce27510c3595eda7.tar.zst bun-265b1035f44b690c79cb2932ce27510c3595eda7.zip |
[router] Fix case sensitivity bug with route params
-rw-r--r-- | src/router.zig | 4 |
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; }; |