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

[BUG] failed to register Get route for /:path pattern: insertion failed due to conflict with previously registered route: //', #362

Open
1 task done
gytis-ivaskevicius opened this issue Jul 28, 2023 · 3 comments

Comments

@gytis-ivaskevicius
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What version of workers-rs are you using?

0.0.17

What version of wrangler are you using?

3.3.0

Describe the bug

Unable to create such routing

    Router::new()
        .get("/abc/:path", |_req, ctx| {
            Response::ok("Hello world")
        })
        .get("/:path", |_req, ctx| {
            Response::ok("Hello world2")
        })
        .run(req, env).await

error:

panicked at 'failed to register Get route for /:path pattern: insertion failed due to conflict with previously registered route: //', /home/gytis/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/worker-0.0.17/src/router.rs:327:21

Steps To Reproduce

Running code specified above

@jason-timios
Copy link

This would be a very helpful update, the path conflict error is preventing us from easily implementing an important feature for our product. If there is any help i can provide to get this through I am more than wiling!

@gytis-ivaskevicius
Copy link
Author

I think I'll just ping a bunch of committers and let's see what happens

@zebp @xtuc @zebp @mendess @kflansburg @dsmyda @KianNH @FlareLine @aseure @TonyGiorgio @will118 @irvinebroque @cjpatton @SebastiaanYN @a1ecbr0wn

Sorry for the ping

@9oelM
Copy link

9oelM commented Oct 19, 2023

any updates? would love to see this update coming too

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

Successfully merging a pull request may close this issue.

3 participants