diff --git a/ctx.go b/ctx.go index 8a25fdb6..9172cf0f 100644 --- a/ctx.go +++ b/ctx.go @@ -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