diff --git a/backend/pom.xml b/backend/pom.xml
index b4d5c1a4df..5df379de4c 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -250,7 +250,7 @@
io.metersphere
jmeter-plugins-dubbo
- 2.7.11
+ 2.7.12
@@ -362,14 +362,6 @@
httpclient
4.5.6
-
-
- org.apache.commons
- commons-text
- 1.3
-
-
-
diff --git a/backend/src/main/java/io/metersphere/api/parse/MsParser.java b/backend/src/main/java/io/metersphere/api/parse/MsParser.java
index 20de9653d3..dd33f8709c 100644
--- a/backend/src/main/java/io/metersphere/api/parse/MsParser.java
+++ b/backend/src/main/java/io/metersphere/api/parse/MsParser.java
@@ -61,7 +61,7 @@ public class MsParser extends ApiImportAbstractParser {
Object body = requestObject.get("body");
if (body instanceof JSONArray) {
JSONArray bodies = requestObject.getJSONArray("body");
- if (StringUtils.equalsIgnoreCase(requestObject.getString("method"), "POST") && bodies != null) {
+ if (bodies != null) {
StringBuilder bodyStr = new StringBuilder();
for (int i = 0; i < bodies.size(); i++) {
String tmp = bodies.getString(i);
@@ -74,7 +74,7 @@ public class MsParser extends ApiImportAbstractParser {
}
} else if (body instanceof JSONObject) {
JSONObject bodyObj = requestObject.getJSONObject("body");
- if (StringUtils.equalsIgnoreCase(requestObject.getString("method"), "POST") && bodyObj != null) {
+ if (bodyObj != null) {
JSONArray kvs = new JSONArray();
bodyObj.keySet().forEach(key -> {
JSONObject kv = new JSONObject();
diff --git a/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql b/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql
index 3235c4246d..74ecfc6196 100644
--- a/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql
+++ b/backend/src/main/resources/db/migration/V39__modify_message_task_create_time.sql
@@ -1,2 +1,2 @@
-alter table message_task
- add create_time bigint(13) null;
\ No newline at end of file
+ALTER TABLE message_task
+ ADD create_time bigint(13) DEFAULT 0;
\ No newline at end of file
diff --git a/backend/src/main/resources/db/migration/V41__modify_message_task_set.sql b/backend/src/main/resources/db/migration/V41__modify_message_task_set.sql
deleted file mode 100644
index 3e41e45e93..0000000000
--- a/backend/src/main/resources/db/migration/V41__modify_message_task_set.sql
+++ /dev/null
@@ -1,3 +0,0 @@
-alter table message_task
- alter column create_time set default 0;
-
diff --git a/frontend/src/business/components/api/test/components/request/ApiRequestConfig.vue b/frontend/src/business/components/api/test/components/request/ApiRequestConfig.vue
index 76d44cf4d2..1c8cc4f4ee 100644
--- a/frontend/src/business/components/api/test/components/request/ApiRequestConfig.vue
+++ b/frontend/src/business/components/api/test/components/request/ApiRequestConfig.vue
@@ -162,9 +162,11 @@ export default {
break;
}
},
- getColor(enable, method) {
- if (enable) {
+ getColor(requestEnable, method) {
+ if (this.scenario.enable && requestEnable) {
return this.methodColorMap.get(method);
+ } else {
+ return '#909399';
}
},
select(request) {
diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js
index c123e7cf03..60c738a149 100644
--- a/frontend/src/business/components/api/test/model/ScenarioModel.js
+++ b/frontend/src/business/components/api/test/model/ScenarioModel.js
@@ -1363,15 +1363,19 @@ class JMXGenerator {
}
addContentType(request, type) {
+ let hasContentType = false;
for (let index in request.headers) {
if (request.headers.hasOwnProperty(index)) {
- if (request.headers[index].name === 'Content-Type') {
+ if (request.headers[index].name === 'Content-Type' && request.headers[index].enable != false) {
request.headers.splice(index, 1);
+ hasContentType = true;
break;
}
}
}
- request.headers.push(new KeyValue({name: 'Content-Type', value: type}));
+ if (!hasContentType) {
+ request.headers.push(new KeyValue({name: 'Content-Type', value: type}));
+ }
}
addRequestArguments(httpSamplerProxy, request) {