mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-22 14:33:29 +00:00
⚡Improve ctx.BodyParser speed -> remove toLower
This commit is contained in:
parent
778c035767
commit
165b0b6107
2
ctx.go
2
ctx.go
@ -235,7 +235,7 @@ func (ctx *Ctx) BodyParser(out interface{}) error {
|
||||
defer decoderPool.Put(schemaDecoder)
|
||||
|
||||
// Get content-type
|
||||
ctype := utils.ToLower(getString(ctx.Fasthttp.Request.Header.ContentType()))
|
||||
ctype := getString(ctx.Fasthttp.Request.Header.ContentType())
|
||||
|
||||
// Parse body accordingly
|
||||
if strings.HasPrefix(ctype, MIMEApplicationJSON) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user