fix: 修复 MkwTool 中 set-cookie 为 null 时的 NPE

This commit is contained in:
yukaidi
2026-05-29 02:37:22 +08:00
parent 0b8592559a
commit 9bcdcb2cb7

View File

@@ -29,7 +29,7 @@ public class MkwTool extends PanBase {
clientSession.getAbs(shareUrl).send().onSuccess(result -> {
String cookie = result.headers().get("set-cookie");
if (!cookie.isEmpty()) {
if (cookie != null && !cookie.isEmpty()) {
String regex = "([A-Za-z0-9_]+)=([A-Za-z0-9]+)";
Pattern pattern = Pattern.compile(regex);