mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-29 07:49:57 +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,
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user