longhujing opened a new issue #2200:
URL: https://github.com/apache/incubator-shenyu/issues/2200


   ### Is there an existing issue for this?
   
   - [X] I have searched the existing issues
   
   ### Current Behavior
   
   http://localhost:9195/queryItem?keyword=#&page=1&pageSize=1
   不使用Soul网关,走本地相同的条件在PostMan是OK的,但是用Soul网关就会出现错误
   {
        "code": 500001,
        "message": "页号不能为空"
   }
   
   ### Expected Behavior
   
   能够像本地请求一样返回正确的结果而不是报错
   
   ### Steps To Reproduce
   
   1. 随意写一个分页的HTTP接口
   2. 参数中包含#等一个或多个特殊字符
   3. 业务端无法正确获取到页号信息
   
   
   http://localhost:9195/queryItem?keyword=#&page=1&pageSize=1
   @GetMapping(values = "/queryItem")
   public Object queryItem(String keyword, Integer page, Integer pageSize) {
           System.out.println(keyword);
           System.out.println(page);
           System.out.println(size);
   }
   
   ### Environment
   
   ```markdown
   ShenYu version(s): 2.3.0
   ```
   
   
   ### Debug logs
   
   _No response_
   
   ### Anything else?
   
   这个问题看了下是DividePlugin插件中URL拼参数造成的,将
   String query = exchange.getRequest().getURI().getQuery();
   替换成
   String query = exchange.getRequest().getURI().getRawQuery();
   
   就可以了,目前我验证是OK的,大佬们可以提出一些其他的改进意见


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