Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use http.Error to also set text/plain content type #32

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

wader
Copy link
Contributor

@wader wader commented Dec 8, 2015

Fixes #31

@@ -40,7 +40,7 @@ func correctReason(t *testing.T, reason error) http.Handler {
" but it failed with the reason %#v", reason, got)
}
// Writes the default failure code
w.WriteHeader(FailureCode)
http.Error(w, "", FailureCode)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit weird. Test is not really using the default error handler

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is only used to check for the correct reason of failure in tests. I guess it could fall back on defaultFailureHandler.

justinas added a commit that referenced this pull request Dec 8, 2015
Use http.Error to also set text/plain content type. Fixes #31
@justinas justinas merged commit 677db26 into justinas:master Dec 8, 2015
@justinas
Copy link
Owner

justinas commented Dec 8, 2015

Thanks!

@wader
Copy link
Contributor Author

wader commented Dec 8, 2015

Nice, thanks for nosurf!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants