boundlessocean1 opened a new pull request, #7755: URL: https://github.com/apache/shenyu/pull/7755
Fixes #7735. An empty `application/x-www-form-urlencoded` request bypassed `operation()` before configured parameter additions could run. A rule adding `injected=yes` therefore worked for `a=1` but sent an empty body downstream for the same request with no original fields. Allow empty forms with configured additions to enter the existing mapping and form-writer path. Empty forms without additions keep the original exchange passthrough, including remove/rename-only rules. No JSON-body behavior is changed. Extend `FormDataOperatorTest` to verify the actual downstream form body, Unicode/special-character encoding, Content-Length, a non-empty-form control, and null/empty addition collections. Correct the original fixture to supply a form body rather than query parameters so its add/rename/remove assertions exercise mapping. ### Validation and pre-submission review - Before the fix: 6 form tests ran; 2 failed because the injected field was missing from empty forms, while 4 controls passed. - After the fix: `./mvnw -B -ntp -pl :shenyu-plugin-param-mapping -am clean install -Dmaven.javadoc.skip=true` passed across **12 modules, 873 tests, 0 failures, 0 errors, 0 skipped**. All 6 form tests passed. - Checkstyle: zero violations across the scoped reactor. Apache RAT: zero unapproved licenses. `git diff --check` passed. - Local self-review completed before committing: reviewed the early return, mapping/writer path, unchanged empty-input passthrough, encoded body length, and test buffer cleanup. No actionable findings remained. This is not a claim of independent or maintainer approval. - Full unrelated reactor and live E2E were not run. Make sure that: - [x] You have read the [contribution guidelines](https://shenyu.apache.org/community/contributor-guide). - [x] You submit test cases (unit or integration tests) that back your changes. - [ ] Your local test passed `./mvnw clean install -Dmaven.javadoc.skip=true`. The affected module and its dependencies passed the scoped command above; the full reactor was not run. -- 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]
