Comments (2)
before ef000ef
if I define
get '/users/:id'
when I get /users
, is 405
, which should be 404
because match the trie-tree node
which has children id
so I think the route matching
must match to the leaf node
maybe also need
if (node.children.length) return true;
in function notMatch
- am I wrong?
from trie-router.
fixed :)
from trie-router.
Related Issues (20)
- Weird error at console HOT 8
- Error if used without any middleware HOT 4
- app.use(router(app))
- What about generating url for the route? HOT 8
- No `next` passed inside routes HOT 10
- add use-case vs. regular regexp routing
- Built-in support for request body with POST/PUT/etc. HOT 1
- fail fast when user passes non-generator function HOT 1
- 405 -> 404 HOT 8
- catch all route? HOT 2
- 100% code coverage HOT 1
- rewrite to make it easier to read HOT 1
- Should not throw error for malformed URL HOT 1
- Do you have any plans for supporting koa@2 and make using more convenient? HOT 8
- require('trie-router') or require('koa-trie-router') ? HOT 1
- Could you guys implement a function named "all" for this router HOT 6
- Separate routes into files? HOT 4
- fails to route OPTIONS HOT 2
- Params support in `use`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trie-router.