Update ctx.go

Co-Authored-By: RW <renewerner87@googlemail.com>
pull/532/head
Fenny 2020-07-03 14:02:00 +02:00
parent b1aeec8c80
commit 2ebadb4c38
1 changed files with 2 additions and 0 deletions

2
ctx.go
View File

@ -856,6 +856,8 @@ func (ctx *Ctx) SendFile(file string, compress ...bool) error {
}
sendFileHandler = sendFileFS.NewRequestHandler()
}
// Keep original path for mutable params
ctx.pathOriginal = utils.ImmutableString(ctx.pathOriginal)
// Disable compression
if len(compress) <= 0 || !compress[0] {
// https://github.com/valyala/fasthttp/blob/master/fs.go#L46