|
|
@@ -181,12 +181,14 @@ function parseSetCookies(cookieString) {
|
|
|
if (attribKeys.includes(aKey)) {
|
|
|
if (retDict[mainKey]) {
|
|
|
retDict[mainKey][aKey] = aValue;
|
|
|
+ attribs = retDict[mainKey].attribs;
|
|
|
+ attribs[aKey] = aValue;
|
|
|
}
|
|
|
} else {
|
|
|
+ mainKey = aKey;
|
|
|
let attribs = {};
|
|
|
- if (pstr.includes(',')) {
|
|
|
- const keys = pstr.split(',');
|
|
|
-
|
|
|
+ if (mainKey.includes(',')) {
|
|
|
+ const keys = mainKey.split(',');
|
|
|
keys.forEach(key => {
|
|
|
const k = key.trim();
|
|
|
if (attribKeys.includes(k)) {
|
|
|
@@ -195,10 +197,7 @@ function parseSetCookies(cookieString) {
|
|
|
mainKey = k;
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- mainKey = aKey;
|
|
|
}
|
|
|
-
|
|
|
retDict[mainKey] = { name: mainKey, value: aValue, attribs: attribs };
|
|
|
retData.push(retDict[mainKey]);
|
|
|
}
|
|
|
@@ -474,14 +473,10 @@ async function checkRefreshToken(){
|
|
|
let cookieSetStr = headers['Set-Cookie'];
|
|
|
let gCookie = parseCookies(ofpayCookie);
|
|
|
let cookieData = parseSetCookies(cookieSetStr);
|
|
|
- lk.log('####Set-Cookie####');
|
|
|
- lk.log(cookieSetStr);
|
|
|
for(let i=0; i < cookieData.length; i++){
|
|
|
let info = cookieData[i];
|
|
|
let name = info.name;
|
|
|
let value = info.value;
|
|
|
- lk.log(name);
|
|
|
- lk.log(value);
|
|
|
if(value == ''){
|
|
|
continue;
|
|
|
}
|