-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [Bug]: use sync.Map maybe error #2425
Comments
Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
Can you try
app := fiber.New(fiber.Config{
Immutable: true,
})
Might be related to fiber‘s super dangerous non-immutable by default config.
Also see #2242
|
thank you,I changed, it works,It seems like I need to read more documents now 😆 |
you can also use our copy function default is that no allocations are created for them and references exist this is enough in most cases, because you only use the parameters for searching or comparing and they are not needed after that only if you want to use the data after sending the response, like you did in the example, it is necessary to make a copy of it by the way this is valid for all data you can get via fiber and the internal core fasthttp |
Bug Description
request /p/112233 response true
request /g/112233 response maybe true or false
so print a ,sometimes print 112233 vicon. false ?? understand
but /w.app.Use(favicon.New())/ is ok
How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
request /p/112233 response true
request /g/112233 response maybe true or false
so print a ,sometimes print 112233 vicon. false ?? understand
but /w.app.Use(favicon.New())/ is ok
Fiber Version
2.43.0
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: