From 82b7abb87724d229cd6f0e3a3e51af16fd73487f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20K=C3=A4stel?= Date: Sun, 14 Feb 2016 21:15:51 +0100 Subject: [PATCH] Retain query parameters from announce URL. --- tracker/http.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tracker/http.go b/tracker/http.go index e6bda240..55b1555d 100644 --- a/tracker/http.go +++ b/tracker/http.go @@ -57,7 +57,9 @@ func (r *httpResponse) UnmarshalPeers() (ret []Peer, err error) { } func (me *httpClient) Announce(ar *AnnounceRequest) (ret AnnounceResponse, err error) { - q := make(url.Values) + // retain query parameters from announce URL + q := me.url.Query() + q.Set("info_hash", string(ar.InfoHash[:])) q.Set("peer_id", string(ar.PeerId[:])) q.Set("port", fmt.Sprintf("%d", ar.Port))