SouthwestAsiaFloat opened a new pull request, #6375: URL: https://github.com/apache/shenyu/pull/6375
## Description This PR fixes the inconsistency between add* and set* operations in the Request Plugin. Previously, addParameters, addHeaders, and addCookies internally used set() operations, causing existing values to be overwritten and making them behave the same as their corresponding set* operations. This behavior is inconsistent with the documented semantics in RequestHandle and the implementation of ModifyResponsePlugin, where: - add* operations append values. - set* operations overwrite values. ## Changes - Use queryParams.add(...) for addParameters. - Use headers.add(...) for addHeaders. - Use cookies.add(...) for addCookies. - Keep existing setParameters, setHeaders, and setCookies behavior unchanged. - Add/update unit tests covering requests that already contain the target key. ## Tests - [x] `./mvn -pl shenyu-plugin/shenyu-plugin-request test` ## Checklist - [x] I have read the contribution guidelines. - [x] I submit test cases that back my changes. - [x] My local tests passed. Fixes #6360 -- 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]
