From b57295093ec6e7398300b1bf7bb2fc4a1b0351df Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Tue, 9 Jul 2024 10:14:16 -0400 Subject: [PATCH] check url error --- internal/modproxy/modproxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/modproxy/modproxy.go b/internal/modproxy/modproxy.go index 2b4b348..91cec86 100644 --- a/internal/modproxy/modproxy.go +++ b/internal/modproxy/modproxy.go @@ -45,6 +45,9 @@ func Request(path string, cached bool) (*http.Response, error) { var last *http.Response for _, proxy := range Proxies() { url, err := neturl.JoinPath(proxy, path) + if err != nil { + return nil, err + } req, err := http.NewRequest(http.MethodGet, url, nil) if err != nil { return nil, err