From 0a06ccae50d66b6fda9a272d85773cc629a7fb51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Tue, 7 Nov 2023 22:14:15 +0800 Subject: [PATCH] platform: Fix legacy code --- experimental/libbox/http.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/experimental/libbox/http.go b/experimental/libbox/http.go index 982962a6..8dda751d 100644 --- a/experimental/libbox/http.go +++ b/experimental/libbox/http.go @@ -151,6 +151,9 @@ type httpRequest struct { func (r *httpRequest) SetURL(link string) (err error) { r.request.URL, err = url.Parse(link) + if err != nil { + return + } if r.request.URL.User != nil { user := r.request.URL.User.Username() password, _ := r.request.URL.User.Password()