file metadata

This commit is contained in:
Ben Sarmiento
2023-10-22 23:54:52 +02:00
parent 50075df13f
commit 571e57904b
4 changed files with 125 additions and 12 deletions

View File

@@ -18,6 +18,9 @@ func Router(mux *http.ServeMux, c config.ConfigInterface, t *torrent.TorrentMana
case http.MethodGet:
intHttp.HandleDirectoryListing(w, r, t, c, cache)
case http.MethodHead:
intHttp.HandleHeadRequest(w, r, t, c, cache)
default:
log.Println("Method not implemented", r.Method)
http.Error(w, "Method not implemented", http.StatusMethodNotAllowed)
@@ -36,7 +39,7 @@ func Router(mux *http.ServeMux, c config.ConfigInterface, t *torrent.TorrentMana
w.WriteHeader(http.StatusOK)
default:
log.Println("Method not implemented", r.Method)
log.Println("Method not implemented", r.Method, r.URL.Path)
http.Error(w, "Method not implemented", http.StatusMethodNotAllowed)
}
})