From ce58fa24a0a6d4ef56fade83c436efabb77975f7 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sat, 12 Nov 2022 00:56:30 +0100 Subject: [PATCH] fix misspell and more log info --- server/gitea/client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/gitea/client.go b/server/gitea/client.go index 79e3c04..c63ee21 100644 --- a/server/gitea/client.go +++ b/server/gitea/client.go @@ -252,7 +252,7 @@ func (client *Client) getMimeTypeByExtension(resource string) string { if client.forbiddenMimeTypes[mimeTypeSplit[0]] || mimeType == "" { mimeType = client.defaultMimeType } - log.Trace().Msgf("probe mime: %s", mimeType) + log.Trace().Msgf("probe mime of %q is %q", resource, mimeType) return mimeType } @@ -261,12 +261,12 @@ func shouldRespBeSavedToCache(resp *http.Response) bool { return false } - contentLengRaw := resp.Header.Get(ContentLengthHeader) - if contentLengRaw == "" { + contentLengthRaw := resp.Header.Get(ContentLengthHeader) + if contentLengthRaw == "" { return false } - contentLeng, err := strconv.ParseInt(contentLengRaw, 10, 64) + contentLeng, err := strconv.ParseInt(contentLengthRaw, 10, 64) if err != nil { log.Error().Err(err).Msg("could not parse content length") }