From 2e82ebc96b3aa8a09b84f80e0c79497c7351e43e Mon Sep 17 00:00:00 2001 From: Gabriel Indik <41590273+gabriel-indik@users.noreply.github.com> Date: Tue, 1 Feb 2022 12:34:15 -0500 Subject: [PATCH] No response end when piping (#52) Signed-off-by: Gabriel Indik --- src/routers/api.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routers/api.ts b/src/routers/api.ts index fd22b2b..1d7d0a0 100644 --- a/src/routers/api.ts +++ b/src/routers/api.ts @@ -176,7 +176,6 @@ router.get('/blobs/*', async (req: Request, res, next) => { res.setHeader(utils.constants.SIZE_HEADER_NAME, metadata.size); res.setHeader(utils.constants.LAST_UPDATE_HEADER_NAME, metadata.lastUpdate); const blobStream = await blobsHandler.retreiveBlob(blobPath); - blobStream.on('end', () => res.end()); blobStream.pipe(res); } catch (err) { next(err);