From 9b678fda97a270cd13ed0a7c6df7148c79a60325 Mon Sep 17 00:00:00 2001 From: Matthew Beatty Date: Fri, 25 Apr 2025 15:29:16 -0400 Subject: [PATCH] Fixed lint error --- data.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/data.go b/data.go index 975e078..f1bcd6a 100644 --- a/data.go +++ b/data.go @@ -340,8 +340,13 @@ func NewRequest(r *http.Request, baseURL *url.URL) (*Request, error) { var additionalQuery string req := &Request{Original: r} - path := r.URL.EscapedPath()[1:] // the image url is stored in the path, so get image url from path but strip leading slash so it's not like /https://example.com - path, err, additionalQuery = decodeURL(path) // Conditionally decode url path param if it is url encoded this enables us to process image urls with query params built in + path := r.URL.EscapedPath()[1:] // the image url is stored in the path, so get image url from path but strip leading slash so it's not like /https://example.com + + decodedPath, err, additionalQuery := decodeURL(path) // Conditionally decode url path param if it is url encoded this enables us to process image urls with query params built in + if err == nil { + path = decodedPath + } + req.URL, err = parseURL(path) if err != nil || !req.URL.IsAbs() {