(tested) Refactor code

* merge 9d04e4c from https://github.com/jzelinskie/chihaya
* sanitize ip address on Scrape requests
* remove NewConnectionID and ValidConnectionID functions from production code
This commit is contained in:
Lawrence, Rendall
2022-04-21 21:57:18 +03:00
parent f9c72341c0
commit 3bc2276fb3
6 changed files with 22 additions and 18 deletions
+1 -1
View File
@@ -178,5 +178,5 @@ func requestedIP(r *http.Request, p bittorrent.Params, opts ParseOptions) (netip
}
addrPort, err := netip.ParseAddrPort(r.RemoteAddr)
return addrPort.Addr().Unmap(), false, err
return addrPort.Addr(), false, err
}