fix misspell and more log info

This commit is contained in:
6543 2022-11-12 00:56:30 +01:00
parent eeaff6de2c
commit ce58fa24a0
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862

View file

@ -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")
}