mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-05 14:07:01 +00:00
fix misspell and more log info
This commit is contained in:
parent
eeaff6de2c
commit
ce58fa24a0
1 changed files with 4 additions and 4 deletions
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue