dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 8d9c39e0ee60f3f280586a66ea27f60c3d062f2f
parent d9270063dcf9ad5f14c2ec5ded84b7296e58ec52
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Fri,  3 Feb 2023 17:27:58 -0800

EOF is fine

Diffstat:
Mpkg/web/handlers/handlers.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go @@ -4519,8 +4519,10 @@ func FileDropDkfDownloadHandler(c echo.Context) error { buf := make([]byte, maxChunkSize) n, err := f.ReadAt(buf, chunkNum*maxChunkSize) if err != nil { - logrus.Error(err) - return c.NoContent(http.StatusInternalServerError) + if !errors.Is(err, io.EOF) { + logrus.Error(err) + return c.NoContent(http.StatusInternalServerError) + } } c.Response().Header().Set(echo.HeaderContentDisposition, fmt.Sprintf("attachment; filename=chunk_%d", chunkNum))