You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i register an error handler to a server instance, whenever i peeks into ctx.Path() method, it seem to corrupt the value of another request which gets handled later on.
I'm building my server with github.com/valyala/fasthttp v1.2.0,
and able to reproduce the issue using this hello world example:
Note that i use MaxRequestBodySize to be able to trigger the error handler using the sent body size, and also note the concurrency parameter (which causes the issue to appear faster).
Note that this result is non-deterministic, the last request can also result in handler requested resource: POST /b, but the value was inaccurate every time i tried these steps.
The text was updated successfully, but these errors were encountered:
When i register an error handler to a server instance, whenever i peeks into
ctx.Path()
method, it seem to corrupt the value of another request which gets handled later on.I'm building my server with
github.com/valyala/fasthttp v1.2.0
,and able to reproduce the issue using this hello world example:
Note that i use
MaxRequestBodySize
to be able to trigger the error handler using the sent body size, and also note the concurrency parameter (which causes the issue to appear faster).Now these are the steps to reproduce the issue:
curl -XPOST http://localhost:8080/a -d 'valid body'
->handler requested resource: POST /a
curl -XPOST http://localhost:8080/b -d 'invalid body'
->error requested resource: POST /b
curl -XPOST http://localhost:8080/c -d 'invalid body'
->error requested resource: POST /c
curl -XPOST http://localhost:8080/d -d 'valid body'
->handler requested resource: POST /c
Note that this result is non-deterministic, the last request can also result in
handler requested resource: POST /b
, but the value was inaccurate every time i tried these steps.The text was updated successfully, but these errors were encountered: