1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-28 13:05:28 -05:00

Fix HTTP proxy

This commit is contained in:
Darien Raymond
2017-01-28 23:34:55 +01:00
parent c09ca41161
commit f6e0d08d34
2 changed files with 3 additions and 4 deletions

View File

@@ -213,10 +213,9 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, rea
ray := s.packetDispatcher.DispatchToOutbound(ctx)
input := ray.InboundInput()
output := ray.InboundOutput()
defer input.Close()
requestDone := signal.ExecuteAsync(func() error {
defer input.Close()
requestWriter := bufio.NewWriter(buf.NewBytesWriter(ray.InboundInput()))
err := request.Write(requestWriter)
if err != nil {