From 7f4b04efb76ea6e8e404078853ae49184be96a53 Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 17 Apr 2025 14:32:59 +0800 Subject: [PATCH] chore: cont. 0866feb --- internal/api/v1/favicon/favicon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/v1/favicon/favicon.go b/internal/api/v1/favicon/favicon.go index 6a56ee5..683d77f 100644 --- a/internal/api/v1/favicon/favicon.go +++ b/internal/api/v1/favicon/favicon.go @@ -36,7 +36,7 @@ func GetFavIcon(w http.ResponseWriter, req *http.Request) { gphttp.ClientError(w, err, http.StatusBadRequest) return } - fetchResult := homepage.FetchFavIconFromURL(&iconURL) + fetchResult := homepage.FetchFavIconFromURL(req.Context(), &iconURL) if !fetchResult.OK() { http.Error(w, fetchResult.ErrMsg, fetchResult.StatusCode) return @@ -59,7 +59,7 @@ func GetFavIcon(w http.ResponseWriter, req *http.Request) { if hp.Icon.IconSource == homepage.IconSourceRelative { result = homepage.FindIcon(req.Context(), r, hp.Icon.Value) } else { - result = homepage.FetchFavIconFromURL(hp.Icon) + result = homepage.FetchFavIconFromURL(req.Context(), hp.Icon) } } else { // try extract from "link[rel=icon]"