This commit is contained in:
chenjianxing 2021-01-06 15:13:40 +08:00
commit d41560b705
1 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package io.metersphere.api.jmeter;
import io.metersphere.api.dto.scenario.request.RequestType;
import io.metersphere.api.service.*;
import io.metersphere.base.domain.ApiScenarioReport;
import io.metersphere.base.domain.ApiTestReport;
@ -339,7 +340,11 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
String start = "RPC Protocol: ";
String end = "://";
if (StringUtils.contains(body, start)) {
return StringUtils.substringBetween(body, start, end).toUpperCase();
String protocol = StringUtils.substringBetween(body, start, end);
if (StringUtils.isNotEmpty(protocol)) {
return protocol.toUpperCase();
}
return RequestType.DUBBO;
} else {
// Http Method
String method = StringUtils.substringBefore(body, " ");