cloudflare / cloudflare/workers-rs

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

Open
#362 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.7k
Forks
429
Avg merge
20h 28m
Merged PRs (30d)
7

Description

### Is there an existing issue for this?

- [X] 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
```rust
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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.