Skip to content

Conversation

@abduelhamit
Copy link

The Recovery middleware couldn't recover a panic correctly after something was already written into the ResponseWriter. So I wrote some tests against this issue and fixed it.

@jszwedko
Copy link
Contributor

It'd be nice if this didn't require buffering the output, but I see what you are going for. Because I feel like many users would not want to buffer the output (and those familiar with the http package are already aware of the fact that the headers are written at the first byte) I think this may make more sense as a separate middleware. Maybe BufferedRecovery?

@abduelhamit
Copy link
Author

I can see that some people want to put stuff out directly instead of buffered. So making a separate middleware makes sense.
But I think that more people want a working recovery middleware instead of unbuffered output. So I suggest that the new middleware becomes the new standard in Classic() and replaces the old one.

@meatballhat
Copy link
Member

👍 to separate middleware and making it the default in Classic

@meatballhat meatballhat self-assigned this May 3, 2016
@jszwedko
Copy link
Contributor

jszwedko commented May 4, 2016

👍 I'm cool with making it the default in Classic()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants