Additional fixes on link checks

This commit is contained in:
Ben Sarmiento
2023-11-19 02:17:46 +01:00
parent 2923f3918d
commit ae635799f8
6 changed files with 10 additions and 10 deletions

View File

@@ -62,7 +62,7 @@ func HandleHeadRequest(w http.ResponseWriter, r *http.Request, t *torrent.Torren
http.Error(w, "Cannot find file", http.StatusNotFound)
return
}
if file.Link == "" {
if !strings.HasPrefix(file.Link, "http") {
// This is a dead file, serve an alternate file
log.Warnf("File %s is no longer available", filename)
http.Error(w, "Cannot find file", http.StatusNotFound)