Skip to content

Commit

Permalink
set key field in http announce request
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkalti committed Jan 13, 2020
1 parent 46df77a commit 576a855
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/tracker/httptracker/httptracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package httptracker
import (
"bytes"
"context"
"encoding/hex"
"fmt"
"io"
"io/ioutil"
Expand Down Expand Up @@ -72,6 +73,7 @@ func (t *HTTPTracker) Announce(ctx context.Context, req tracker.AnnounceRequest)
if t.trackerID != "" {
q.Set("trackerid", t.trackerID)
}
q.Set("key", hex.EncodeToString(req.Torrent.PeerID[16:20]))

u.RawQuery = q.Encode()
t.log.Debugf("making request to: %q", u.String())
Expand Down

0 comments on commit 576a855

Please sign in to comment.