1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 11:24:35 +00:00

fix(stp): read file in non-binary mode if debug one

This commit is contained in:
Saad Jutt
2022-04-02 07:09:27 +05:00
parent 122faad55f
commit 527f70e90d

View File

@@ -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