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 2020/08/14 06:49:42 UTC

[GitHub] [apisix] Gary-Airwallex opened a new issue #2058: request help: Parameters in path

Gary-Airwallex opened a new issue #2058:
URL: https://github.com/apache/apisix/issues/2058


   ### Issue description
   https://github.com/gin-gonic/gin#parameters-in-path described a ":" syntax and an "*" syntax for parameters in path, I believe radixtree (and therefore APISIX) intended to support both.  
   
   For the ":" syntax, currently APISIX seems to accept _ANY_ string. For example, request "/a/b/c/foo" seems to be accepted by "uri": "/:id/foo". I'm not sure if that's the expected behavior: matching ":id" with non-slash character sounds more natural to me (something like "[^/]+").
   
   For the "*" syntax, my understanding is that "*action" is an optional parameter. For example if we configure "uri": "/:id/foo/*action/bar" in APISIX, both requests "/1/foo/get/bar" and "/2/foo/bar" should be matched by the route, while request "/3/foo/a/b/bar" should be rejected. However in APISIX the "*" syntax has similar behavior with the colon syntax. The tests 7, 8 here https://github.com/api7/lua-resty-radixtree/blob/master/t/parameter.t seems broken: they are name "/name/*name/foo" but tested with ""/name/:name/foo""
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 1.5, with radixtree 2.1
   * OS: osx 10.15
   


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



[GitHub] [apisix] membphis closed issue #2058: request help: Parameters in path

Posted by GitBox <gi...@apache.org>.
membphis closed issue #2058:
URL: https://github.com/apache/apisix/issues/2058


   


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



[GitHub] [apisix] Gary-Airwallex commented on issue #2058: request help: Parameters in path

Posted by GitBox <gi...@apache.org>.
Gary-Airwallex commented on issue #2058:
URL: https://github.com/apache/apisix/issues/2058#issuecomment-674786364


   @membphis Looks like the second issue (about the asterisk "\*" syntax, denoting an optional parameter I believe) is not addressed in radixtree 2.2; could you re-open the issue?


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



[GitHub] [apisix] membphis closed issue #2058: request help: Parameters in path

Posted by GitBox <gi...@apache.org>.
membphis closed issue #2058:
URL: https://github.com/apache/apisix/issues/2058


   


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



[GitHub] [apisix] membphis commented on issue #2058: request help: Parameters in path

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2058:
URL: https://github.com/apache/apisix/issues/2058#issuecomment-673986290


   we may fix this bug in `resty-radixtree`


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



[GitHub] [apisix] membphis commented on issue #2058: request help: Parameters in path

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2058:
URL: https://github.com/apache/apisix/issues/2058#issuecomment-674955195


   > @membphis Looks like the second issue (about the asterisk "*" syntax, denoting an optional parameter I believe) is not addressed in radixtree 2.2; could you re-open the issue?
   
   I created a new issue at `resty-radixtree`: https://github.com/api7/lua-resty-radixtree/issues/56
   we can fix it later.
   
   one issue for one bug, it is easier to fix.


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