From 527f70e90dd7369766e375ac2d6fc38b2a114d11 Mon Sep 17 00:00:00 2001 From: Saad Jutt Date: Sat, 2 Apr 2022 07:09:27 +0500 Subject: [PATCH] fix(stp): read file in non-binary mode if debug one --- api/src/controllers/internal/Execution.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/controllers/internal/Execution.ts b/api/src/controllers/internal/Execution.ts index 755bd00..f0a828d 100644 --- a/api/src/controllers/internal/Execution.ts +++ b/api/src/controllers/internal/Execution.ts @@ -157,7 +157,9 @@ ${program}` : '' const httpHeaders: HTTPHeaders = extractHeaders(headersContent) const fileResponse: boolean = - httpHeaders.hasOwnProperty('content-type') && !returnJson + httpHeaders.hasOwnProperty('content-type') && + !returnJson && // not a POST Request + !isDebugOn(vars) // Debug is not enabled const webout = (await fileExists(weboutPath)) ? fileResponse