net/http: on panic http.server re-runs the handler multiple times on Windows #57588
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In a simple HTTP server with a handler that panics (either through calling
panic()
or by dereferencing a nil pointer) on Windows, the server runs the handler again multiple times for the same request. On Linux, the handler runs only once.What did you expect to see?
I expect the console log to show one stack trace indicating a panic, and the HTTP connection to close. (This is the behaviour on Linux.)
What did you see instead?
The HTTP connection remains open, and the console log shows several stack traces.
Example log file. This log file is for a single request.
The text was updated successfully, but these errors were encountered: