diff --git a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/http/HttpPlugin.java b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/http/HttpPlugin.java index a70d27fd..0ed6f45b 100644 --- a/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/http/HttpPlugin.java +++ b/Bench4Q-Agent/src/main/java/org/bench4q/agent/plugin/basic/http/HttpPlugin.java @@ -117,7 +117,7 @@ public class HttpPlugin extends ParameterBarn { return uri; } - @Behavior(value = "Get", type = BehaviorType.USER_BEHAVIOR) + @Behavior(value = "Batch", type = BehaviorType.USER_BEHAVIOR) public List batchRequest( @Parameter(value = "requests", type = SupportTypes.Table) String requests) { ExecutorService executorService = Executors.newFixedThreadPool(2); @@ -248,6 +248,11 @@ public class HttpPlugin extends ParameterBarn { doExtractResponseVariablesAndSave(respVarsToSaveInSession, method.getResponseBodyAsString()); } + int pos = -1; + if (!contentType.isEmpty() + && (pos = contentType.indexOf(';')) != -1) { + contentType = contentType.substring(0, pos).toLowerCase(); + } return new HttpReturn((responseCode % 100) < 4, responseCode, method.getURI().toString(), contentLength, contentType, responseHeaders);