You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because nowhere is checked if h.openFSFile() returns an error because the compressed file can't be written to the filesystem. The solution would be to check for the error like in handleRequest() and retry without compression:
func (h*fsHandler) handleRequest(ctx*RequestCtx) {
...varerrerrorff, err=h.openFSFile(filePath, mustCompress, fileEncoding)
ifmustCompress&&err==errNoCreatePermission {
ctx.Logger().Printf("insufficient permissions for saving compressed file for %q. Serving uncompressed file. "+"Allow write access to the directory with this file in order to improve fasthttp performance", filePath)
mustCompress=falseff, err=h.openFSFile(filePath, mustCompress, fileEncoding)
}
...
}
The text was updated successfully, but these errors were encountered:
* Implemented what was described by me in issue#1766.
* fixed linting isssues in fs.go with gofmt -e -d -s
---------
Co-authored-by: Raphael Habichler <[email protected]>
Original bug gofiber/fiber#2940
The problem is in fs.go in the following function: openIndexFile()
Because nowhere is checked if
h.openFSFile()
returns an error because the compressed file can't be written to the filesystem. The solution would be to check for the error like inhandleRequest()
and retry without compression:The text was updated successfully, but these errors were encountered: