Improve ctx.Is performance

This commit is contained in:
ReneWerner87 2020-07-21 21:28:13 +02:00
parent 88b4da6a03
commit aafa784bbb

2
ctx.go
View File

@ -524,7 +524,7 @@ func (ctx *Ctx) Is(extension string) bool {
}
return strings.HasPrefix(
utils.TrimLeft(utils.GetString(utils.ToLowerBytes(ctx.Fasthttp.Request.Header.ContentType())), ' '),
utils.TrimLeft(utils.GetString(ctx.Fasthttp.Request.Header.ContentType()), ' '),
extensionHeader,
)
}