Explorar o código

improve http response performance

Darien Raymond %!s(int64=8) %!d(string=hai) anos
pai
achega
8800238d24
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      proxy/http/server.go

+ 1 - 1
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)