-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐞 Nested routing not working, id interpolated incorrectly #354
Comments
@cgiacomi, thanks for your bug report, I can confirm that this is unwanted behavior and will be fixed asap with a hotfix. |
Hi ReneWerner87,
looking at the output from your tests you should see the response
"NEVER CALLED BUG id: 12345" and "NEVER CALLED BUG bid: 999" returned...
but it doesn't seem to me that it's the case, which means that you just
reproduced the bug.
kind regards,
Chris
…On Mon, May 11, 2020 at 7:59 AM ReneWerner87 ***@***.***> wrote:
[image: image]
<https://user-images.githubusercontent.com/7063188/81528431-f4b50600-935c-11ea-981e-08c8e4562f6e.png>
[image: image]
<https://user-images.githubusercontent.com/7063188/81528463-08606c80-935d-11ea-8e34-48adc20bbfd3.png>
[image: image]
<https://user-images.githubusercontent.com/7063188/81528473-12826b00-935d-11ea-9336-ecbc80e98b01.png>
[image: image]
<https://user-images.githubusercontent.com/7063188/81528485-1e6e2d00-935d-11ea-90ad-747ac161f5c3.png>
am currently not able to reproduce the error, if I can, I will fix the
problem, does anyone see an error in the reproduction?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#354 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADXYLUFNBO4AUOHMYMR3ADRQ6H3RANCNFSM4M5NS2SQ>
.
|
found the bug in the meantime, I'm working on a fix |
@ReneWerner87 @Fenny thank you for your time. |
ReneWerner87
pushed a commit
to ReneWerner87/fastpath
that referenced
this issue
May 11, 2020
ReneWerner87
pushed a commit
to ReneWerner87/fastpath
that referenced
this issue
May 11, 2020
ReneWerner87
pushed a commit
to ReneWerner87/fiber
that referenced
this issue
May 11, 2020
🐞 Nested routing not working, id interpolated incorrectly gofiber#354 gofiber#354
ReneWerner87
pushed a commit
to ReneWerner87/fastpath
that referenced
this issue
May 11, 2020
This was referenced May 11, 2020
ReneWerner87
pushed a commit
to ReneWerner87/fastpath
that referenced
this issue
May 11, 2020
fixed in PR: @cgiacomi thanks for the bug report |
Fenny
added a commit
that referenced
this issue
May 11, 2020
**🚀 Fiber `v1.9.6`** Special thanks to @renanbastos93 & @ReneWerner87 for optimizing the current router. Help use translate our API documentation by [clicking here](https://crowdin.com/project/gofiber) 🔥 New - `AcquireCtx` / `ReleaseCtx` The Ctx pool is now accessible for third-party packages - Fiber docs merged [Russian](https://docs.gofiber.io/v/ru/) translations **84%** - Fiber docs merged [Spanish](https://docs.gofiber.io/v/es/) translations **65%** - Fiber docs merged [French](https://docs.gofiber.io/v/fr/) translations **40%** - Fiber docs merged [German](https://docs.gofiber.io/v/de/) translations **32%** - Fiber docs merged [Portuguese](https://docs.gofiber.io/v/pt/) translations **24%** 🩹 Fixes - Hotfix for interpolated params in nested routes #354 - Some `Ctx` methods didn't work correctly when called without an `*App` pointer. - `ctx.Vary` sometimes added duplicates to the response header - Improved router by ditching regexp and increased performance by **817%** without allocations. ```go // Tested with 350 github API routes Benchmark_Router_OLD-4 614 2467460 ns/op 68902 B/op 600 allocs/op Benchmark_Router_NEW-4 3429 302033 ns/op 0 B/op 0 allocs/op ``` 🧹 Updates - Add context benchmarks - Remove some unnecessary functions from `utils` - Add router & param test cases - Add new coffee supporters to readme - Add third party middlewares to readme - Add more comments to source code - Cleanup some old helper functions 🧬 Middleware - [gofiber/adaptor](https://github.com/gofiber/adaptor) `v0.0.1` Converter for net/http handlers to/from Fiber handlers - [gofiber/session](https://github.com/gofiber/session) `v1.0.0` big improvements and support for storage providers - [gofiber/logger](https://github.com/gofiber/logger) `v0.0.6` supports `${error}` param - [gofiber/embed](https://github.com/gofiber/embed) `v0.0.9` minor improvements and support for directory browsing Co-authored-by: ReneWerner87 <renewerner87@googlemail.com>
Thanks @ReneWerner87! |
renanbastos93
added a commit
to renanbastos93/fastpath
that referenced
this issue
May 11, 2020
Nested routing not working, id interpolated incorrectly #354 gofiber/fiber#354
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fiber version/commit
1.9.5
Issue description
Nested routes not called, id interpolated incorrectly
Expected behavior
Nested route called correctly
Steps to reproduce
go run server.go
(snippet below)
curl --request GET --url http://localhost:1500/resource
(this route called correctly)
curl --request GET --url http://localhost:1500/resource/12345
(this route will work, and response contains the correct id '12345')
curl --request GET --url http://localhost:1500/resource/12345/bug
(this route will not work, 'bug' is considered part of the id of the resource, still routes to the previous route)
curl --request GET --url http://localhost:1500/resource/12345/bug/999
(also not working, will still call 'reusource/:id' with the invalid id)
Code snippet
Thank you for the great work with this framework. Bug reports are so impersonal, this one doesn't want to be like that, and it's not a show stopper for me as I reverted to 1.9.3 which seems to work fine. Thank you.
The text was updated successfully, but these errors were encountered: