Close Body after reading.
This commit is contained in:
parent
f844b7a793
commit
3680e840d1
1 changed files with 1 additions and 0 deletions
1
main.go
1
main.go
|
@ -72,6 +72,7 @@ func genericHTTPProxy(w http.ResponseWriter, req *http.Request) {
|
||||||
w.WriteHeader(resp.StatusCode)
|
w.WriteHeader(resp.StatusCode)
|
||||||
|
|
||||||
io.Copy(w, resp.Body)
|
io.Copy(w, resp.Body)
|
||||||
|
resp.Body.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
func copyHeaders(from http.Header, to http.Header) {
|
func copyHeaders(from http.Header, to http.Header) {
|
||||||
|
|
Loading…
Reference in a new issue