soulbird commented on issue #6513:
URL: https://github.com/apache/apisix/issues/6513#issuecomment-1060066821


   Can you provide more detailed steps to reproduce?The following is the method 
I tried, and the situation you said did not occur, the routing is indeed 
case-sensitive。
   1、create route with `arg_appId` and thren request the uri
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/5 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uris":[
           "/micro/app/read",
           "/micro/app/read/"
       ],
       "name":"read1",
       "vars":[
           [
               "arg_corpid",
               "IN",
               [
                   "wwef5a06cd2931632c"
               ]
           ],
           [
               "arg_appId",
               "==",
               "1411"
           ]
       ],
       "plugins":{
           "redirect":{
               "ret_code":302,
               "uri":"https://bigId";
           }
       },
       "status":1
   }'
   ```
   
   ```shell
   curl -v '127.0.0.1:9080//micro/app/read?appId=1411&corpid=wwef5a06cd2931632c'
   *   Trying 127.0.0.1:9080...
   * Connected to 127.0.0.1 (127.0.0.1) port 9080 (#0)
   > GET //micro/app/read?appId=1411&corpid=wwef5a06cd2931632c HTTP/1.1
   > Host: 127.0.0.1:9080
   > User-Agent: curl/7.77.0
   > Accept: */*
   > 
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 302 Moved Temporarily
   < Date: Sun, 06 Mar 2022 23:38:21 GMT
   < Content-Type: text/html
   < Content-Length: 142
   < Connection: keep-alive
   < Location: https://bigId
   < Server: APISIX/2.12.0
   < 
   ....
   ```
   ```shell
   curl -v '127.0.0.1:9080//micro/app/read?appid=1411&corpid=wwef5a06cd2931632c'
   *   Trying 127.0.0.1:9080...
   * Connected to 127.0.0.1 (127.0.0.1) port 9080 (#0)
   > GET //micro/app/read?appid=1411&corpid=wwef5a06cd2931632c HTTP/1.1
   > Host: 127.0.0.1:9080
   > User-Agent: curl/7.77.0
   > Accept: */*
   > 
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 404 Not Found
   < Date: Sun, 06 Mar 2022 23:38:30 GMT
   < Content-Type: text/plain; charset=utf-8
   < Transfer-Encoding: chunked
   < Connection: keep-alive
   < Server: APISIX/2.12.0
   < 
   ```
   
   2、create route with `arg_appid`, and then request the uri
   ```shell
   curl http://127.0.0.1:9080/apisix/admin/routes/6 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
   {
       "uris":[
           "/micro/app/read",
           "/micro/app/read/"
       ],
       "name":"read2",
       "vars":[
           [
               "arg_corpid",
               "IN",
               [
                   "wwef5a06cd2931632c"
               ]
           ],
           [
               "arg_appid",
               "==",
               "1411"
           ]
       ],
       "plugins":{
           "redirect":{
               "ret_code":307,
               "uri":"https://smallId";
           }
       },
       "status":1
   }'
   ```
   ```shell
   curl -v '127.0.0.1:9080//micro/app/read?appId=1411&corpid=wwef5a06cd2931632c'
   *   Trying 127.0.0.1:9080...
   * Connected to 127.0.0.1 (127.0.0.1) port 9080 (#0)
   > GET //micro/app/read?appId=1411&corpid=wwef5a06cd2931632c HTTP/1.1
   > Host: 127.0.0.1:9080
   > User-Agent: curl/7.77.0
   > Accept: */*
   > 
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 302 Moved Temporarily
   < Date: Sun, 06 Mar 2022 23:39:09 GMT
   < Content-Type: text/html
   < Content-Length: 142
   < Connection: keep-alive
   < Location: https://bigId
   < Server: APISIX/2.12.0
   < 
   ...
   ```
   ```shell
   curl -v '127.0.0.1:9080//micro/app/read?appid=1411&corpid=wwef5a06cd2931632c'
   *   Trying 127.0.0.1:9080...
   * Connected to 127.0.0.1 (127.0.0.1) port 9080 (#0)
   > GET //micro/app/read?appid=1411&corpid=wwef5a06cd2931632c HTTP/1.1
   > Host: 127.0.0.1:9080
   > User-Agent: curl/7.77.0
   > Accept: */*
   > 
   * Mark bundle as not supporting multiuse
   < HTTP/1.1 307 Temporary Redirect
   < Date: Sun, 06 Mar 2022 23:39:19 GMT
   < Content-Type: text/html; charset=utf-8
   < Content-Length: 168
   < Connection: keep-alive
   < Location: https://smallId
   < Server: APISIX/2.12.0
   < 
   ```


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