fix edgecases

This commit is contained in:
6543 2022-11-11 05:50:29 +01:00
parent 51c3cf7e9b
commit f18169fdc2
No known key found for this signature in database
GPG key ID: B8BE6D610E61C862
2 changed files with 12 additions and 6 deletions

View file

@ -57,7 +57,7 @@ func (f FileResponse) createHttpResponse(cacheKey string) (http.Header, int) {
}
header.Set(ETagHeader, f.ETag)
header.Set(ContentTypeHeader, f.MimeType)
header.Set(ContentLengthHeader, fmt.Sprint(len(f.Body)))
header.Set(ContentLengthHeader, fmt.Sprintf("%d", len(f.Body)))
header.Set(PagesCacheIndicatorHeader, "true")
log.Trace().Msgf("fileCache for '%s' used", cacheKey)