From 74d06fde62e42caaceb2df092f07931b26ce83d2 Mon Sep 17 00:00:00 2001 From: mxd <838425805@qq.com> Date: Tue, 3 Nov 2020 21:59:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=8E=A5=E5=8F=A3=E6=97=B6=EF=BC=8C=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E7=BB=93=E6=9E=9C=E6=9C=AA=E8=A2=AB=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=A4=84=E7=90=86=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/org/ssssssss/magicapi/config/RequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/ssssssss/magicapi/config/RequestHandler.java b/src/main/java/org/ssssssss/magicapi/config/RequestHandler.java index ff879c1b..abc6decb 100644 --- a/src/main/java/org/ssssssss/magicapi/config/RequestHandler.java +++ b/src/main/java/org/ssssssss/magicapi/config/RequestHandler.java @@ -174,8 +174,8 @@ private Object invokeTestRequest(ApiInfo info, MagicScriptDebugContext context, try { // 初始化debug操作 initializeDebug(context, request, response); - Object result = executeScript(info.getScript(), context); response.addHeader(HEADER_RESPONSE_WITH_MAGIC_API, "true"); + Object result = executeScript(info.getScript(), context); if (context.isRunning()) { return new JsonBodyBean<>(1000, context.getId(), resultProvider.buildResult(1000, context.getId(), result), result); } else if (context.isException()) { //判断是否出现异常