refactor create test plan and recording

This commit is contained in:
hemeimei 2014-09-30 10:50:09 +08:00
parent 15ac6877a4
commit f30ed0f193
2 changed files with 3 additions and 3 deletions

View File

@ -214,9 +214,9 @@ public class TestPlanFactory {
private boolean isFilterType(String filterTypeMatch, private boolean isFilterType(String filterTypeMatch,
BehaviorModel behaviorModel) { BehaviorModel behaviorModel) {
for (ParameterModel parameterModel : behaviorModel.getParameters()) { 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; return true;
} else { } else {
return false; return false;

View File

@ -207,7 +207,7 @@ public class RequestHandler implements Runnable {
sb.append(changeList2String(headerMap.get(key)) + "\r\n"); sb.append(changeList2String(headerMap.get(key)) + "\r\n");
continue; 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"); sb.append("Content-Length: "+responseModel.getResponse().length +"\r\n");
continue; continue;
} }