Skip to content

Fix superfluous response.WriteHeader write - #3076

Merged
tomasmik merged 1 commit into
masterfrom
header-write-fix
Feb 2, 2021
Merged

Fix superfluous response.WriteHeader write#3076
tomasmik merged 1 commit into
masterfrom
header-write-fix

Conversation

@tomasmik

@tomasmik tomasmik commented Feb 2, 2021

Copy link
Copy Markdown
Contributor

Writing to http.ResponseWriter twice is illegal, so we no longer do that.
Closes: #3075

Fixes log errors:

2020-09-19T09:05:58.460 ??? github.com/rs/zerolog@v1.17.2/log.go:403 > http: superfluous response.WriteHeader call from github.com/mysteriumnetwork/node/tequilapi/utils.WriteAsJSON (utils.go:38)

Writing to http.ResponseWriter is illegal, so we no longer do that.
@tomasmik
tomasmik merged commit 13aee0a into master Feb 2, 2021
@tomasmik
tomasmik deleted the header-write-fix branch February 2, 2021 13:23
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.

Writing an error sometimes results in superfluous response.WriteHeader

3 participants