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

how to support path with and without trailing slash ? #69

Open
peczenyj opened this issue Oct 30, 2023 · 3 comments
Open

how to support path with and without trailing slash ? #69

peczenyj opened this issue Oct 30, 2023 · 3 comments

Comments

@peczenyj
Copy link

peczenyj commented Oct 30, 2023

I have a very restrictive requirement

I need to support path likes

/foo
/foo/

without redirect from one form to the other ( in other words, the last trailing slash should be ignored )

https://github.com/buaazp/fasthttprouter works fine for this, but fasthttp/router panics

panic: a handler is already registered for path '/stream/'

goroutine 1 [running]:
github.com/fasthttp/router/radix.(*Tree).Add(0xc0003ee640, {0xc000120540, 0x8}, 0xc0003ed110)

how can I achieve it?

@peczenyj
Copy link
Author

peczenyj commented May 5, 2024

@savsgio any idea?

@savsgio
Copy link
Member

savsgio commented May 23, 2024

Hi @peczenyj,

Sorry for my delayed answer.

Now the lib can't support this. But if you want and need it, I will be happy to review a PR 😉

@peczenyj
Copy link
Author

Hi @peczenyj,

Sorry for my delayed answer.

Now the lib can't support this. But if you want and need it, I will be happy to review a PR 😉

I tried to add such feature but... it did not work properly. The impact is huge :/

I will keep trying, thanks

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