Last minute fixes
This commit is contained in:
@@ -45,7 +45,7 @@ func HandlePropfindRequest(w http.ResponseWriter, r *http.Request, t *torrent.To
|
||||
}
|
||||
|
||||
func handleListDirectories(w http.ResponseWriter, t *torrent.TorrentManager) error {
|
||||
fmt.Fprint(w, "<?xml?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
fmt.Fprint(w, "<?xml version=\"1.0\" encoding=\"utf-8\"?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
// initial response is the directory itself
|
||||
fmt.Fprint(w, dav.Directory("", ""))
|
||||
|
||||
@@ -66,7 +66,7 @@ func handleListTorrents(w http.ResponseWriter, requestPath string, t *torrent.To
|
||||
return fmt.Errorf("cannot find directory %s", basePath)
|
||||
}
|
||||
|
||||
fmt.Fprint(w, "<?xml?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
fmt.Fprint(w, "<?xml version=\"1.0\" encoding=\"utf-8\"?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
// initial response is the directory itself
|
||||
fmt.Fprint(w, dav.Directory(basePath, ""))
|
||||
|
||||
@@ -99,7 +99,7 @@ func handleListFiles(w http.ResponseWriter, requestPath string, t *torrent.Torre
|
||||
return fmt.Errorf("cannot find torrent %s", accessKey)
|
||||
}
|
||||
|
||||
fmt.Fprint(w, "<?xml?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
fmt.Fprint(w, "<?xml version=\"1.0\" encoding=\"utf-8\"?><d:multistatus xmlns:d=\"DAV:\">")
|
||||
// initial response is the directory itself
|
||||
fmt.Fprint(w, dav.Directory(requestPath, tor.LatestAdded))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user