for the request GET /data/asdf, some_middleware will not be called.
Solution: This is because we're comparing the method agnostic routes with method-ful routes. That is, we're comparing /data to __GET__/data/:test. The solution was to artificially ignore those first level of routes when traversing the tree. The root of the agnostic tree will be compared with the second level of the tree with methods.
Issue: Right now, if you have code that looks like this:
for the request
GET /data/asdf
,some_middleware
will not be called.Solution: This is because we're comparing the method agnostic routes with method-ful routes. That is, we're comparing
/data
to__GET__/data/:test
. The solution was to artificially ignore those first level of routes when traversing the tree. The root of the agnostic tree will be compared with the second level of the tree with methods.