lymerin opened a new pull request, #7448: URL: https://github.com/apache/shenyu/pull/7448
Fixes #7442. `buildPath()` removes the template’s query string to obtain `basePath`. However, `buildFinalPath()` uses whether the original template contained `?` to select the first separator. It therefore appends `&` to a path that no longer contains `?`, producing `/users&page=1&fixed=true` instead of `/users?page=1&fixed=true`. Both parameters become part of the request path. This PR fixes two related mistakes in `RequestConfigHelper`: - Start generated query parameters with `?`, then append existing parameters with `&`. - Pass `existingQuery` into `processArguments()` and check query-field boundaries for duplicates. Previously, the check inspected the path, allowing duplicate fixed parameters and incorrectly suppressing dynamic parameters when the path contained text such as `page=`. The resulting request preserves the endpoint path and supplies its query parameters correctly. Fixed parameters retain their original text and take precedence over dynamic parameters with the same name. Existing dynamic-value encoding is preserved. Production changes are confined to `RequestConfigHelper`. Regression tests cover query merging, empty queries, duplicate names, field-boundary matching, and encoding. The callback test verifies the actual request URI, query parameters, and ShenYu context paths. Validation: 49 targeted tests passed, Checkstyle passed, and the full clean install with tests passed. Make sure that: - [x] You have read the [[contribution guidelines](https://shenyu.apache.org/community/contributor-guide)](https://shenyu.apache.org/community/contributor-guide). - [x] You submit test cases (unit or integration tests) that back your changes. - [x] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`. -- 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]
