Bandwidth tracking
This commit is contained in:
@@ -220,7 +220,9 @@ func (dl *Downloader) streamFileToResponse(
|
||||
}
|
||||
dl.RequestedBytes.Add(reqBytes)
|
||||
dl.TotalBytes.Add(uint64(n))
|
||||
log.Debugf("Served %d MB of the requested %d MB of file %s (range=%s)", bToMb(uint64(n)), bToMb(reqBytes), unrestrict.Filename, req.Header.Get("Range"))
|
||||
if cfg.ShouldLogRequests() {
|
||||
log.Debugf("Served %d MB of the requested %d MB of file %s (range=%s)", bToMb(uint64(n)), bToMb(reqBytes), unrestrict.Filename, req.Header.Get("Range"))
|
||||
}
|
||||
}
|
||||
|
||||
func redirect(resp http.ResponseWriter, req *http.Request, url string) {
|
||||
|
||||
Reference in New Issue
Block a user