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

ProxyResponseWriter.Write is a little too "naive" #14

Closed
raff opened this issue May 9, 2018 · 0 comments
Closed

ProxyResponseWriter.Write is a little too "naive" #14

raff opened this issue May 9, 2018 · 0 comments

Comments

@raff
Copy link
Contributor

raff commented May 9, 2018

This implementation seems to imply the handler will do only one Write to complete the request, that is not true (or not documented anywhere):

func (r *ProxyResponseWriter) Write(body []byte) (int, error) {
	r.body = body
        ...

Maybe changing ProxyResponseWriter.body to a bytes.Buffer would be a better implementation.

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

No branches or pull requests

1 participant