Commit 38101db6 authored by 赵然's avatar 赵然

zr

parent a6f5d428
...@@ -317,7 +317,7 @@ public class Authorization { ...@@ -317,7 +317,7 @@ public class Authorization {
Map<String,String> map = response.getCookies(); Map<String,String> map = response.getCookies();
logger.info("cookies:"+map.toString()); logger.info("cookies:"+map.toString());
hdCookies=new HashMap<>(response.getCookies()); hdCookies=new HashMap<>(response.getCookies());
if(hdCookies!=null||hdCookies.size()!=0) { if(hdCookies!=null&&hdCookies.size()!=0) {
//取消安全校验 //取消安全校验
hdCookies.remove("csrf_token"); hdCookies.remove("csrf_token");
hdCookies.put("appId", appId); hdCookies.put("appId", appId);
...@@ -347,7 +347,7 @@ public class Authorization { ...@@ -347,7 +347,7 @@ public class Authorization {
paras.put("isAutoLogin", "true"); paras.put("isAutoLogin", "true");
Response response = given().cookies(cookies).params(paras).post(url); Response response = given().cookies(cookies).params(paras).post(url);
hdCookies=new HashMap<>(response.getCookies()); hdCookies=new HashMap<>(response.getCookies());
if(hdCookies!=null||hdCookies.size()!=0){ if(hdCookies!=null&&hdCookies.size()!=0){
hdCookies.remove("csrf_token"); hdCookies.remove("csrf_token");
hdCookiesCommon.put(email,hdCookies); hdCookiesCommon.put(email,hdCookies);
} }
...@@ -377,7 +377,7 @@ public class Authorization { ...@@ -377,7 +377,7 @@ public class Authorization {
Response response = given().cookies(cookies).params(paras).post(url); Response response = given().cookies(cookies).params(paras).post(url);
response.prettyPrint(); response.prettyPrint();
hdCookies=new HashMap<>(response.getCookies()); hdCookies=new HashMap<>(response.getCookies());
if(hdCookies!=null||hdCookies.size()!=0){ if(hdCookies!=null&&hdCookies.size()!=0){
hdCookies.remove("csrf_token"); hdCookies.remove("csrf_token");
hdCookiesCommon.put(account,hdCookies); hdCookiesCommon.put(account,hdCookies);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment