File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ let httpError = require('./errors')
22let binaryTypes = require ( './helpers/binary-types' )
33let { brotliCompressSync } = require ( 'zlib' )
44
5- let binaryTypesSet = new Set ( binaryTypes )
6-
75module . exports = function responseFormatter ( req , params ) {
86 let isError = params instanceof Error
97
@@ -170,7 +168,7 @@ module.exports = function responseFormatter (req, params) {
170168
171169 // Handle body encoding (if necessary)
172170 let [ cTest ] = ( res . headers [ 'content-type' ] || '' ) . split ( ';' )
173- let isBinary = binaryTypesSet . has ( cTest )
171+ let isBinary = binaryTypes . includes ( cTest )
174172 let bodyIsString = typeof res . body === 'string'
175173 let b64enc = i => new Buffer . from ( i ) . toString ( 'base64' )
176174 function compress ( body ) {
You can’t perform that action at this time.
0 commit comments