arthur-zhang opened a new pull request #4558:
URL: https://github.com/apache/apisix/pull/4558


   has_route_not_under_apisix is wrongly assigned, which will  cause router 
strange  behaviour.
   
   `has_route_not_under_apisix` is initiated to `false`, and fetch_api_router() 
method is iterating all the route api to find if exists some router api not 
start with "/apisix".
   
   if the router list appear like this:
   
   ```
   local api_routes = {
       { uri = "/foo/bar", },
       { uri = "/apisix/aa", },
   }
   ```
   
   has_route_not_under_apisix is first set to `true`, but second loop the value 
is set to `false`. which is toally wrong.
   
   this bug is introduced in this pr https://github.com/apache/apisix/pull/2826
   
   the second problem is that, the check value is wrongly assigned.
   
   ![](https://store-tg1.cvte.com/pics_2021070716256718362790.jpg)
   
   
   
   
   ### Pre-submission checklist:
   
   * [ ] Did you explain what problem does this PR solve? Or what new features 
have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix/tree/master#community) first**
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to