mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
warn user when http proxy is not finished properly
This commit is contained in:
parent
e8901368d7
commit
b7d022702e
@ -274,7 +274,10 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, wri
|
||||
|
||||
requestWriter := buf.NewBufferedWriter(ray.InboundInput())
|
||||
common.Must(requestWriter.SetBuffered(false))
|
||||
return request.Write(requestWriter)
|
||||
if err := request.Write(requestWriter); err != nil {
|
||||
return newError("failed to write whole request").Base(err).AtWarning()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
||||
responseDone := signal.ExecuteAsync(func() error {
|
||||
@ -308,7 +311,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, wri
|
||||
response.Header.Set("Proxy-Connection", "close")
|
||||
}
|
||||
if err := response.Write(writer); err != nil {
|
||||
return newError("failed to write response").Base(err)
|
||||
return newError("failed to write response").Base(err).AtWarning()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user