net/http: http.TimeoutHandler rewrites panic stack trace #51587
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Currently using the latest
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I use
http.TimeoutHandler
middleware and fire panic in handler.Code to reproduce:
What did you expect to see?
When I send http request to
http://localhost:8080
I expect to get original stack trace of panic like:That allows to investigate every problem in handler layer.
What did you see instead?
I get stack trace of panic in console that doesn't point to problem:
Additional investigation
https://github.com/golang/go/blob/master/src/net/http/server.go#L3379
The source code in
http.TimeoutHandler
rewrites panic and breaks stack trace. Thus we can not to investigate the original problem on handlers layer.The text was updated successfully, but these errors were encountered: