1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-30 05:56:54 -05:00

improve http response performance

This commit is contained in:
Darien Raymond 2017-04-12 11:13:54 +02:00
parent 64b929862c
commit 8800238d24
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -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)