diff --git a/handler/fetchself/fetch.go b/handler/fetchself/fetch.go index 86bc22f..e854842 100644 --- a/handler/fetchself/fetch.go +++ b/handler/fetchself/fetch.go @@ -95,6 +95,7 @@ func fetchSelf(msg model.Message) (reply *model.Reply) { log.Println("parseSystemInfo failed", err) return } + reply = &model.Reply{} reply.FromMsg = msg reply.ReplyMsg = info.String() return diff --git a/util/url.go b/util/url.go index 8d361a5..6dcccaf 100644 --- a/util/url.go +++ b/util/url.go @@ -2,7 +2,6 @@ package util import ( "bytes" - "crypto/tls" "fmt" "io" "net/url" @@ -72,10 +71,7 @@ func DownloadFile(urlStr string, dirPath string) (filepath string, err error) { ReadTimeout: 30 * time.Second, WriteTimeout: 30 * time.Second, MaxConnWaitTimeout: 30 * time.Second, - // TLSConfig: nil, // 使用默认配置 - TLSConfig: &tls.Config{ - InsecureSkipVerify: true, - }, + TLSConfig: nil, } // 准备请求