mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-29 15:59:58 +00:00
Merge pull request #1110 from apernet/fix-http-connect-header
fix(client/http): ffmpeg not works with proxy
This commit is contained in:
commit
52c8f82c2b
@ -278,6 +278,11 @@ func sendSimpleResponse(conn net.Conn, req *http.Request, statusCode int) error
|
|||||||
ProtoMinor: req.ProtoMinor,
|
ProtoMinor: req.ProtoMinor,
|
||||||
Header: http.Header{},
|
Header: http.Header{},
|
||||||
}
|
}
|
||||||
|
// Remove the "Content-Length: 0" header, some clients (e.g. ffmpeg) may not like it.
|
||||||
|
resp.ContentLength = -1
|
||||||
|
// Also, prevent the "Connection: close" header.
|
||||||
|
resp.Close = false
|
||||||
|
resp.Uncompressed = true
|
||||||
return resp.Write(conn)
|
return resp.Write(conn)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user