remove stupid 1000 limit

This commit is contained in:
Ben Sarmiento
2023-10-21 23:54:26 +02:00
parent 882cb3d853
commit a41024aec9
3 changed files with 6 additions and 64 deletions

View File

@@ -19,11 +19,12 @@ func HandleGetRequest(w http.ResponseWriter, r *http.Request, t *torrent.Torrent
requestPath := path.Clean(r.URL.Path)
segments := strings.Split(requestPath, "/")
fmt.Println(segments, len(segments))
// If there are less than 3 segments, return an error or adjust as needed
if len(segments) < 3 {
log.Println("Invalid url", requestPath)
if len(segments) < 4 {
// log.Println("Invalid url", requestPath)
// http.Error(w, "Cannot find file", http.StatusNotFound)
handleSingleTorrent(requestPath, w, r, t)
HandlePropfindRequest(w, r, t, c)
return
}