Closed
Description
Hi.
I am using echo version v4.1.0.
Observing that in an http request, information which is set in echo context using echo.Context.Set() and retrieved back using echo.Context.Get() in the same http request, across middlewares, is found to have leaking information from different requests.
The .Get() method is giving back data which was .Set() in some other http request.
Looked around for similar issue and found this link #273 which says the echo context was made concurrent safe in #1158
But the issue still coming.
I do not have a publicly shareable code yet but it is doing the following:
- start logger
- calls echo's 'requestid' middleware.
- custommiddleware1: does a c.Set("customerID", uniqueint). This uniquecustomerid is logged in a log file alongwith the requestid set above.
- custommiddleware2: does a c.Get("customerID") and logs it alongwith the requestid set above. This is logging customer ID which was set in some other request.
This is seen only under high load and reproduction is not trivial.