From e32b0dc2ea52f19c604a9e671e793a26b8b1e3ab Mon Sep 17 00:00:00 2001 From: boypt <1033514+boypt@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:25:16 +0800 Subject: [PATCH] api/url accepts 512k torrents size --- server/server_api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/server_api.go b/server/server_api.go index 6e10c592..c0a8879d 100644 --- a/server/server_api.go +++ b/server/server_api.go @@ -111,8 +111,8 @@ func (s *Server) apiPOST(r *http.Request) error { return fmt.Errorf("Invalid remote torrent URL: %s %w", url, err) } defer remote.Body.Close() - if remote.ContentLength > 64*1024 { - //enforce max body size (64k?) + if remote.ContentLength > 512*1024 { + //enforce max body size (512k) return fmt.Errorf("Remote torrent too large") } data, err = ioutil.ReadAll(remote.Body)