mirror of
https://github.com/TeamPiped/http3-ytproxy.git
synced 2024-08-14 23:56:43 +00:00
Async copy.
To improve performance, this results in better consistent average latency but lower throughput in some cases.
This commit is contained in:
parent
17bc0c3321
commit
916df915b3
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -101,7 +101,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
|
|
||||||
w.WriteHeader(resp.StatusCode)
|
w.WriteHeader(resp.StatusCode)
|
||||||
|
|
||||||
io.Copy(w, resp.Body)
|
go io.Copy(w, resp.Body)
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyHeaders(from http.Header, to http.Header) {
|
func copyHeaders(from http.Header, to http.Header) {
|
||||||
|
|
Loading…
Reference in a new issue