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/10/10 10:45:37 UTC

[GitHub] [apisix] idbeta opened a new issue #2378: request help: why the uri in route not work

idbeta opened a new issue #2378:
URL: https://github.com/apache/apisix/issues/2378


   ### Issue description
   ```shell
   $ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '{"uri": "/helloOQ%26F8G%23J%27K%2C-f4BT%5Ba%7EN_%3A6C3UkMmgpeVyu72RjL%2A%5D%24", "upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}}'
   HTTP/1.1 200 OK
   ... ...
   ```
   test
   ```shell
   $ curl -i 'http://127.0.0.1:9080/helloOQ%26F8G%23J%27K%2C-f4BT%5Ba%7EN_%3A6C3UkMmgpeVyu72RjL%2A%5D%24'
   HTTP/1.1 404 Not Found
   ... ...
   ```
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): master
   * OS: mac
   


----------------------------------------------------------------
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 #2378: request help: why the uri in route not work

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


   your case is wrong. here is a correct example, @idbeta you can take a look at it:
   
   ```
   # should use the original uri value
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
     "uri": "/hello\r\n",
     "upstream": {"nodes": {"127.0.0.1:9666": 1}, "type": "roundrobin"}
   }'
   
   # when we try to hit the route, we should use URL encode way. `\r` -> `%0d`, `\n` -> `%0a`
   curl -i 'http://127.0.0.1:9080/hello%0d%0a'
   ```


----------------------------------------------------------------
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 #2378: request help: why the uri in route not work

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


   I think we can close this issue now


----------------------------------------------------------------
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 #2378: request help: why the uri in route not work

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


   


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