Solve http issue
This commit is contained in:
@@ -869,7 +869,7 @@ func (t *TorrentManager) updateDirectoryResponsesCache() {
|
||||
continue
|
||||
}
|
||||
davRet += dav.Directory(tor.AccessKey, tor.LatestAdded)
|
||||
htmlRet += fmt.Sprintf("<li><a href=\"/http/%s/%s\">%s</a></li>", directory, tor.AccessKey, tor.AccessKey)
|
||||
htmlRet += fmt.Sprintf("<li><a href=\"/http/%s/%s/\">%s</a></li>", directory, tor.AccessKey, tor.AccessKey)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -897,7 +897,7 @@ func (t *TorrentManager) buildTorrentResponses(tor *Torrent) (string, string) {
|
||||
davRet += dav.File(filename, file.Bytes, file.Ended)
|
||||
|
||||
filePath := filepath.Join("$dir", tor.AccessKey, url.PathEscape(filename))
|
||||
htmlRet += fmt.Sprintf("<li><a href=\"%s\">%s</a></li>", filePath, filename)
|
||||
htmlRet += fmt.Sprintf("<li><a href=\"/http/%s\">%s</a></li>", filePath, filename)
|
||||
}
|
||||
davRet += "</d:multistatus>"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user