fatmanverse opened a new pull request, #13727:
URL: https://github.com/apache/seatunnel/pull/13727
### Purpose of this pull request
Closes #13726.
With `format = binary`, `method = POST` and `keep_params_as_form = false`,
configured `params` are missing from the URL. When `body` is present the
parameters are dropped; without `body` they are sent as form fields. Text/JSON
requests already put them in the query. This affects both the source reader
streaming path and `HttpClientProvider.executeBinary()`.
Use the existing binary request builder for both buffered and streaming
calls, append non-form parameters with `URIBuilder`, and remove the duplicate
private POST builder.
### Does this PR introduce _any_ user-facing change?
Yes. Binary POST now honors `keep_params_as_form = false` by putting
`params` in the URL, with or without a body. Existing URL parameters and the
supplied body are preserved. Endpoints that relied on the previous form
behavior should explicitly set `keep_params_as_form = true`. No option name,
default, public API, or dependency changes. English/Chinese HTTP docs and
migration notes are updated.
Confirmed against `dev` at `0bef81d003a9dcc3266a10140dc639534ad81bfd`;
released versions were not tested.
### How was this patch tested?
Added `HttpBinaryRequestTest` with 12 cases using a real loopback HTTP
server. Streaming and buffered POST with/without a body, URL encoding, existing
query preservation, explicit form mode with/without a body, GET, absent
parameters, headers, binary bytes, filenames and chunk indices.
- Before the fix: 4 cases fail against the original production code.
- After the fix: 83 HTTP-module tests pass independently on JDK 11 and JDK
17, including 12 new cases.
- The affected module and its upstream Maven reactor pass `verify` and
Spotless checks on both JDKs. `spotless:apply` and a separate `-q -DskipTests
verify` also pass.
- Tests and builds ran on a Linux test host. No engine E2E or
whole-repository test run is claimed.
```sh
./mvnw -B -ntp -pl
seatunnel-connectors-v2/connector-http/connector-http-base -am spotless:apply
./mvnw -B -ntp -pl
seatunnel-connectors-v2/connector-http/connector-http-base -am \
-DskipITs -Dsurefire.timeout=60 \
-Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false \
'-Dtest=Http*Test,JsonField*Test,BinaryResponseCollectorTest,FilenameExtractorTest'
\
clean verify
./mvnw -q -pl seatunnel-connectors-v2/connector-http/connector-http-base -am
-DskipITs -DskipTests verify
```
### Check list
- [x] Added regression tests and updated English/Chinese documentation.
- [x] Reviewed compatibility and added migration notes.
- [x] No new dependencies or connector registration changes.
--
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]