Skip to content

Commit 0435651

Browse files
elboulangerojbkempf
authored andcommitted
http: Count a download only for redirect renderer
1 parent 2285d2a commit 0435651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: http/http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func (h *HTTP) mirrorHandler(w http.ResponseWriter, r *http.Request, ctx *Contex
444444

445445
if !ctx.IsMirrorlist() {
446446
logs.LogDownload(resultRenderer.Type(), r.Method, status, results, err)
447-
if len(mlist) > 0 && r.Method == "GET" {
447+
if len(mlist) > 0 && r.Method == "GET" && resultRenderer.Type() == "REDIRECT" {
448448
timeout := GetConfig().SameDownloadInterval
449449
if r.Header.Get("Range") == "" || timeout == 0 {
450450
h.stats.CountDownload(mlist[0], fileInfo)

0 commit comments

Comments
 (0)