This is an automated email from the ASF dual-hosted git repository.
fanjia pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new c3ab84caa4 Fix HttpSource bug (#6824)
c3ab84caa4 is described below
commit c3ab84caa4be6fb6dd62c147761df39bb3ca68c3
Author: Eric <[email protected]>
AuthorDate: Fri May 10 12:51:16 2024 +0800
Fix HttpSource bug (#6824)
---
.../seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java
b/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java
index db0d36d9b6..c2c3da6968 100644
---
a/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java
+++
b/seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/source/HttpSourceReader.java
@@ -116,7 +116,7 @@ public class HttpSourceReader extends
AbstractSingleSplitReader<SeaTunnelRow> {
this.httpParameter.getHeaders(),
this.httpParameter.getParams(),
this.httpParameter.getBody());
- if (HttpResponse.STATUS_OK == response.getCode()) {
+ if (response.getCode() >= 200 && response.getCode() <= 207) {
String content = response.getContent();
if (!Strings.isNullOrEmpty(content)) {
if (this.httpParameter.isEnableMultilines()) {