From 8800238d24043c8c274a37e5eded5a2f5efacd99 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Wed, 12 Apr 2017 11:13:54 +0200 Subject: [PATCH] improve http response performance --- proxy/http/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/http/server.go b/proxy/http/server.go index 285ca9369..ff27c1441 100644 --- a/proxy/http/server.go +++ b/proxy/http/server.go @@ -247,7 +247,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, rea }) responseDone := signal.ExecuteAsync(func() error { - responseReader := bufio.NewReader(buf.ToBytesReader(ray.InboundOutput())) + responseReader := bufio.NewReaderSize(buf.ToBytesReader(ray.InboundOutput()), 8192) response, err := http.ReadResponse(responseReader, request) if err == nil { StripHopByHopHeaders(response.Header)