fixes here and there
This commit is contained in:
@@ -30,7 +30,7 @@ func HandleDirectoryListing(w http.ResponseWriter, r *http.Request, t *torrent.T
|
||||
case len(filteredSegments) == 3:
|
||||
output, err = handleSingleTorrent(requestPath, w, r, t)
|
||||
default:
|
||||
log.Errorf("Request %s %s not found", r.Method, requestPath)
|
||||
log.Warnf("Request %s %s not found", r.Method, requestPath)
|
||||
http.Error(w, "Not Found", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
@@ -89,7 +89,7 @@ func handleSingleTorrent(requestPath string, w http.ResponseWriter, r *http.Requ
|
||||
accessKey := path.Base(requestPath)
|
||||
torrent, _ := t.TorrentMap.Get(accessKey)
|
||||
if torrent == nil {
|
||||
return nil, fmt.Errorf("cannot find torrent %s", requestPath)
|
||||
return nil, fmt.Errorf("cannot find torrent %s", accessKey)
|
||||
}
|
||||
|
||||
htmlDoc := "<ol>"
|
||||
|
||||
Reference in New Issue
Block a user