apache / apache/apisix-java-plugin-runner

bug: request get Args params

未关闭
#310 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
152
派生
102
PR 合并指标
30 天内没有已合并 PR

描述

### Issue description

### Environment
* Operating System: Windows 11
* JDK Version: 17
*IDE: IntelliJ IDEA 2024.1.4U
* APISIX Java Plugin Runner Version: 0.4.0
* Maven Dependency

org.apache.apisix
apisix-runner-starter
0.4.0

### Minimal test code / Steps to reproduce the issue

When using the getArgs method of the org.apache.apisix.plugin.runner.HttpRequest class, the returned parameter type is Map. The expected behavior is for it to return a parameter type consistent with the getParameterMap method of the jakarta.servlet.ServletRequestWrapper class, which is Map.
Steps to Reproduce the Issue
Set the Maven dependency to apisix-runner-starter version 0.4.0.
Use the HttpRequest.getArgs() method in the APISIX Java Plugin to retrieve parameters.
Submit multiple parameters with the same key using a GET method or POST form.
### What's the actual result? (including assertion message & call stack if applicable)
* HttpRequest.getArgs() returns parameters as Map.
* When using GET or POST forms with multiple parameters having the same key, previous key-value pairs are lost, and only the last key-value pair is retained.
### What's the expected result?
HttpRequest.getArgs() should return parameters as Map, matching the behavior of jakarta.servlet.ServletRequestWrapper.getParameterMap() and correctly retaining all values for the same key.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。