You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/03/21 13:51:21 UTC
[GitHub] [apisix] ShaoZeMing edited a comment on issue #3865: bug: Routing priority matching bug
ShaoZeMing edited a comment on issue #3865:
URL: https://github.com/apache/apisix/issues/3865#issuecomment-803583673
> In such a case, the priority of the second route rule should be larger than the first one.
Yes, I think so too, but the actual test is not the case. He always chose the `a` route, which surprised me a bit.


```
router a:
{
"code":0,
"message":"",
"data":{
"id":"346524199914832835",
"create_time":1616074118,
"update_time":1616118098,
"uris":[
"/*"
],
"name":"test_host",
"desc":"测试仅只有host",
"methods":[
"GET"
],
"hosts":[
"test-dev-1.apisix.xthktech.cn"
],
"vars":[
],
"plugins":{
"jwt-auth":{
"disable":false
}
},
"upstream_id":"341144078647297023",
"labels":{
"API_VERSION":"v0.0.1"
},
"status":1
},
"request_id":"3db8e16d-0346-4066-9dc9-e81a64d2a750"
}
router b :
{
"code":0,
"message":"",
"data":{
"id":"346524374901195715",
"create_time":1616074222,
"update_time":1616118115,
"uris":[
"/*"
],
"name":"test_host_header",
"desc":"测试同时有host+header(app-name:test-header)",
"methods":[
"GET"
],
"hosts":[
"test-dev-1.apisix.xthktech.cn"
],
"vars":[
[
"http_app-name",
"==",
"test-header"
]
],
"plugins":{
"hmac-auth":{
"disable":false
}
},
"upstream_id":"341144078647297023",
"labels":{
"API_VERSION":"v0.0.1"
},
"status":1
},
"request_id":"c1e232c2-2aa3-4da9-abd0-34a3191c31d9"
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org