修复cookie不能使用表达式的BUG
This commit is contained in:
parent
c61f30fa85
commit
52e45e04ec
@ -168,6 +168,15 @@ public class RequestExecutor implements ShapeExecutor,Grammerable{
|
||||
//设置本节点Cookie
|
||||
cookies = getRequestCookie(request, node.getListJsonValue(COOKIE_NAME, COOKIE_VALUE), context, variables);
|
||||
if(!cookies.isEmpty()){
|
||||
cookies.entrySet().forEach(entry->{
|
||||
try {
|
||||
Object value = engine.execute(entry.getValue(), variables);
|
||||
entry.setValue(Objects.toString(value));
|
||||
} catch (Exception e) {
|
||||
context.error("设置Cookie出错:{}",e);
|
||||
}
|
||||
|
||||
});
|
||||
context.debug("设置Cookie:{}", cookies);
|
||||
request.cookies(cookies);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user