From c6810681897fdfb8f2d00a77bc11bf9f8953a102 Mon Sep 17 00:00:00 2001 From: johlanse Date: Sun, 14 Aug 2022 17:25:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=83=BD=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=BA=8C=E7=BB=B4=E7=A0=81=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/client.go | 1 + web/controller.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/client.go b/utils/client.go index ba61c5c..2636d5e 100644 --- a/utils/client.go +++ b/utils/client.go @@ -14,6 +14,7 @@ func init() { client.SetProxy(http.ProxyFromEnvironment) if log.GetLevel() == log.DebugLevel { client.DebugLog = true + client = client.DevMode().EnableDumpAll().EnableDebugLog() } client.SetLogger(&myLog{}) client.SetCommonHeader("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36") diff --git a/web/controller.go b/web/controller.go index 674d62b..2bda2a1 100644 --- a/web/controller.go +++ b/web/controller.go @@ -4,7 +4,6 @@ package web import ( "fmt" - "io" "net/http" "net/http/httputil" "net/url" @@ -302,8 +301,9 @@ func sign() gin.HandlerFunc { }) return } + data := response.Bytes() + log.Debugln("访问sign结果返回内容为 ==》 " + string(data)) ctx.Writer.WriteHeader(200) - data, _ := io.ReadAll(response.Body) ctx.Writer.Write(data) } }