mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
reduce buffer size for http header reading
This commit is contained in:
parent
9db86e871e
commit
33ba08be77
@ -74,7 +74,7 @@ func isTimeout(err error) bool {
|
||||
}
|
||||
|
||||
func (s *Server) Process(ctx context.Context, network v2net.Network, conn internet.Connection, dispatcher dispatcher.Interface) error {
|
||||
reader := bufio.NewReaderSize(conn, 8192)
|
||||
reader := bufio.NewReaderSize(conn, 2048)
|
||||
|
||||
Start:
|
||||
conn.SetReadDeadline(time.Now().Add(time.Second * 16))
|
||||
@ -234,7 +234,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, rea
|
||||
})
|
||||
|
||||
responseDone := signal.ExecuteAsync(func() error {
|
||||
responseReader := bufio.NewReaderSize(buf.ToBytesReader(ray.InboundOutput()), 8192)
|
||||
responseReader := bufio.NewReaderSize(buf.ToBytesReader(ray.InboundOutput()), 2048)
|
||||
response, err := http.ReadResponse(responseReader, request)
|
||||
if err == nil {
|
||||
StripHopByHopHeaders(response.Header)
|
||||
|
Loading…
Reference in New Issue
Block a user