1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-07 04:51:34 +00:00

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

SendFile response code for success
This commit is contained in:
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

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())