Convert everything to bytes

This commit is contained in:
Ben Sarmiento
2023-12-10 21:39:58 +01:00
parent 97161862ee
commit ff72265bfb
3 changed files with 25 additions and 20 deletions

View File

@@ -89,7 +89,7 @@ func (zr *ZurgRouter) httpTorrentDirectoryHandler(resp http.ResponseWriter, req
}
resp.Header().Set("Content-Type", "text/html; charset=\"utf-8\"")
resp.WriteHeader(http.StatusOK)
fmt.Fprint(resp, *out)
resp.Write(out)
}
func (zr *ZurgRouter) httpDirectoryHandler(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
@@ -101,7 +101,7 @@ func (zr *ZurgRouter) httpDirectoryHandler(resp http.ResponseWriter, req *http.R
}
resp.Header().Set("Content-Type", "text/html; charset=\"utf-8\"")
resp.WriteHeader(http.StatusOK)
fmt.Fprint(resp, *out)
resp.Write(out)
}
func (zr *ZurgRouter) httpRootHandler(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {
@@ -112,7 +112,7 @@ func (zr *ZurgRouter) httpRootHandler(resp http.ResponseWriter, req *http.Reques
}
resp.Header().Set("Content-Type", "text/html; charset=\"utf-8\"")
resp.WriteHeader(http.StatusOK)
fmt.Fprint(resp, *out)
resp.Write(out)
}
func (zr *ZurgRouter) propfindFileHandler(resp http.ResponseWriter, req *http.Request, params httprouter.Params) {