diff --git a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java index 08dd37fd..c34a4e8b 100644 --- a/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java +++ b/Bench4Q-Master/src/main/java/org/bench4q/master/domain/factory/TestPlanFactory.java @@ -214,9 +214,9 @@ public class TestPlanFactory { private boolean isFilterType(String filterTypeMatch, BehaviorModel behaviorModel) { for (ParameterModel parameterModel : behaviorModel.getParameters()) { - if (parameterModel.getKey().equals("expResCnttype")) { + if (parameterModel.getKey().equals("expResCnttype") ) { - if (parameterModel.getValue().matches(filterTypeMatch)) { + if (parameterModel.getValue() != null && parameterModel.getValue().matches(filterTypeMatch)) { return true; } else { return false; diff --git a/Bench4Q-Recorder/src/main/java/org/bench4q/recorder/httpcapture/RequestHandler.java b/Bench4Q-Recorder/src/main/java/org/bench4q/recorder/httpcapture/RequestHandler.java index bb8cd380..b99637d3 100644 --- a/Bench4Q-Recorder/src/main/java/org/bench4q/recorder/httpcapture/RequestHandler.java +++ b/Bench4Q-Recorder/src/main/java/org/bench4q/recorder/httpcapture/RequestHandler.java @@ -207,7 +207,7 @@ public class RequestHandler implements Runnable { sb.append(changeList2String(headerMap.get(key)) + "\r\n"); continue; } - if(key.equals("Content-Length") && headerMap.get(key).get(0).equals("-1")){ + if(key.equals("Content-Length")){ sb.append("Content-Length: "+responseModel.getResponse().length +"\r\n"); continue; }