-
Notifications
You must be signed in to change notification settings - Fork 577
Open
Labels
Description
There is a comment here regarding https://github.com/urfave/negroni/blob/master/recovery.go#L160:
maruel/panicparse#81 (comment)
As a matter of fact, the code you pointed to in recovery.go is functionally wrong. The only way it could be done is if it were buffering a temporary http.ResponseWriter, and only flushing it when the handler returned. The current code will fail at line 161 as WriteHeader() will ignore the status if data was already written (that's how HTTP works) and the stack data will just be appended to whatever was already streamed to the user. That's bad.