[filesystem middleware] improve status for SendFile (#2664)

SendFile response code for success
pull/2665/head
Michael Bell 2023-10-06 12:10:20 +01:00 committed by GitHub
parent 59409f3841
commit 8228da91fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -254,6 +254,8 @@ func SendFile(c *fiber.Ctx, filesystem http.FileSystem, path string) error {
return fiber.ErrForbidden
}
c.Status(fiber.StatusOK)
modTime := stat.ModTime()
contentLength := int(stat.Size())