Open LawyZheng opened 2 years ago
There are some router bugfixes in update, perhaps you mistakenly believe that the incorrect results in v1.7.1 and v1.7.4 are correct.
I believe it's not a bug, /group
should match /:a
and /group/
should match /group/*b
. It's expected.
Description
I don't know whether it is a bug or a change to the latest version. I just want to know how to use it for the next version updating.
I get some routers as follow:
I run some cases to test the routers.
/cc
, which is supposed to be returned as:cc
./cC
, which is supposed to be returned as:cC
./group
, which is supposed to be returned as*/
.This is the case that differs from the various versions.
/group/1
, which is supposed to be returned as*/1
.I test these cases in v1.7.1, v.1.7.4, v1.7.7. I got three different results.
For v1.7.1 It passed all tests, and the log shows routers had been redirected.
For v1.7.4 It passed three tests, except the 3rd one. And the log didn't show that routers had been redirected.
It shows that not only the router is matched differently compared to v1.7.1, but also the param is omitted.
For v1.7.7 It passed three tests, except the 3rd one. And the log didn't show that routers had been redirected.
It shows the param had been parsed correctly, but the router is still different compared to v1.7.1.
Expectations
Then I add an empty router in the group to fix this problem in v1.7.4 and v1.7.7, and it passed all tests successfully.
As I said, I don't know whether it is a bug or a change. I'm just confused about how to use it, considering the future updating for the router matching rule.
Environment