Skip to content
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

🐞 caseSensitive option affects params #214

Closed
soonoo opened this issue Mar 9, 2020 · 1 comment
Closed

🐞 caseSensitive option affects params #214

soonoo opened this issue Mar 9, 2020 · 1 comment

Comments

@soonoo
Copy link

soonoo commented Mar 9, 2020

router.Post("/:userId", func(c *fiber.Ctx) {
    // user requests /soonoo
    userId := c.Params("userid") // "soonoo"
    userId := c.Params("userId") // empty string
})

I'm not sure whether this is a bug but it is weird that caseSensitive is changing parameter names as well.
I wanted to open a PR but I'm not sure if that's OK.

@soonoo soonoo added the bug label Mar 9, 2020
@Fenny
Copy link
Member

Fenny commented Mar 9, 2020

Nice catch, should be an easy fix.
I will take a look when I get back home 👍

https://github.com/gofiber/fiber/blob/master/router.go#L164
https://github.com/gofiber/fiber/blob/master/router.go#L186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants