Skip to content

render: skip default serializer after Renderer writes - #66

Open
team-humaki wants to merge 1 commit into
go-chi:masterfrom
team-humaki:render-skip-respond-if-wrote
Open

team-humaki wants to merge 1 commit into
go-chi:masterfrom
team-humaki:render-skip-respond-if-wrote

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #56.

Renderer.Render may already write the response (for example an aliased struct that calls JSON). Render and RenderList then also ran the default serializer, appending a second body. Skip that second write when the renderer already wrote.

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.

render.Render() writes to writer unexpected data of aliased type

1 participant